3.3.13 · D1Combinational Circuits

Foundations — ALU design fundamentals

1,832 words8 min readBack to topic

Before you can read the parent note, you must be able to read its language. Below is every symbol and idea it silently assumes, built in the order that each one leans on the one before it. Start at line one — nothing is assumed.


0. What "bit" and "binary number" actually mean

To hold bigger numbers we put several bits side by side. Reading them like ordinary place-value digits — but with powers of 2 instead of 10 — gives a whole number.

The big ("sigma") just says "add up all the terms as runs from to ." We need it because writing every time is tiring.


1. Naming the wires: , , , and subscripts

A_i reveal check
bit number of the bundle , the wire whose place-value is .

2. The gates: what , , , and the bar mean

The parent note writes formulas like . Those symbols are logic gates — tiny circuits that take 0/1 inputs and give a 0/1 output. Here is each one, its rule, and its picture.

a ⊕ b reveal check
XOR — outputs 1 when the two inputs differ.
The bar over means
NOT — flip every bit of (0↔1).

3. Carry: , ,

When you add digits, sometimes a column overflows into the next — that spill is the carry. In decimal, writes 2 and carries 1. Binary does the same, just sooner: writes 0, carries 1.


4. Two's complement: how a bit-pattern becomes negative

The parent's magic line is . To believe it you need to know how negatives are stored.

So a 4-bit pattern's signed value is The range for 4 bits is — remember that; it is why Example 1 in the parent overflows.

Negate x in two's complement reveal check
flip every bit () then add 1.

5. Putting the vocabulary to work: reading the full-adder formula

Now every symbol in the parent's core equations is defined, so they read like plain English:


6. The multiplexer: the "picker"

The bundle of select lines is the you see in . In practice these select lines are driven by the Datapath and Control Unit.


7. Flags: , , ,

The parent produces four extra one-bit outputs that describe the result. Now that carries and the MSB are defined, each is readable:


Prerequisite map

Bit 0 or 1

n-bit number place value

Naming wires A B F subscripts

Gates AND OR XOR NOT

Carry c_i and c_n

Two's complement negate

Full adder sum and carry

Multiplexer picks one result

Flags Z C N V

ALU design fundamentals


Equipment checklist

Read a 4-bit pattern like as a decimal number
.
State the rule for AND, OR, XOR, NOT
AND=1 iff both 1; OR=1 iff at least one 1; XOR=1 iff they differ; NOT flips the bit.
Explain why is the sum bit
XOR outputs 1 when an odd number of inputs are 1 — exactly what a sum column needs.
Negate a number in two's complement
flip every bit then add 1 ().
Say what and mean
= carry into the first column (can force the "+1"); = carry off the top, becomes the Carry flag.
Explain what a multiplexer does
routes one of several inputs to a single output, chosen by the select lines .
Tell apart from
= carry out of MSB (unsigned overflow); (signed overflow, sign corrupted).
Interpret the MSB two ways
unsigned: worth ; signed two's complement: worth , so MSB=1 means negative.