Skip to content
BetterDL

Bit slice

Also called: ALU slice, 1-bit ALU slice, one-bit slice

One bit position of a multi-bit circuit such as an ALU. An n-bit ALU is n identical slices side by side, sharing control lines and chaining carries.

Many datapath circuits do the same thing to every bit. Instead of designing an n-bit circuit all at once, you design one bit slice, the circuit for a single bit position, and copy it n times.

A 1-bit slice of the course's ALU contains:

  • a controlled inverter on B (an XOR driven by SUB)
  • a full adder for A, the possibly inverted B, and the carry from the slice to its right
  • the logic units, here an AND gate and an OR gate
  • a result multiplexer that picks one unit's output as Y, using the opcode

To make n bits:

  • place n slices side by side
  • connect every slice to the same opcode lines
  • chain the carries: slice i's carry-out feeds slice i + 1's carry-in, and SUB drives slice 0's carry-in
  • add the flag logic after the slices, looking at all n outputs and the top two carries

Bit slicing is why designs scale: a 4-bit and a 64-bit ALU differ only in how many slices you place. In the 1970s, companies even sold 4-bit ALU slice chips that designers cascaded into wider processors.

ABCF1F0YCout

Worked example

Example

Two slices computing 0101 − 0011

Opcode 11 (SUB), so SUB = 1 in every slice. Follow the two lowest slices.

  1. 1.

    Slice 0: A0 = 1, B0 = 1 is inverted to 0, carry-in = SUB = 1. 1 + 0 + 1 = 10₂, so its sum is 0 and it carries 1.

  2. 2.

    Slice 1: A1 = 0, B1 = 1 is inverted to 0, carry-in 1. 0 + 0 + 1 = 1, so its sum is 1 and it carries 0.

  3. 3.

    F1 = 1, so each slice's MUX outputs the sum: Y1 = 1, Y0 = 0.

  4. 4.

    The full result is 0010 = 2 = 5 − 3, and the low two bits match.

Common mistakes

  • Giving each slice its own opcode. All slices share the same select lines.

  • Forgetting that slice 0's carry-in must come from SUB.

  • Computing the flags inside each slice. N, Z, C and V look at the whole word.

Practice Bit slice

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Bit slice is taught in Adders and ALUs.