04-06-2012, 11:09 AM
Logic Gates
Logic Gates.ppt (Size: 2.86 MB / Downloads: 54)
How to fix this
We need to create an adder that can take a carry bit as an additional input
Inputs: x, y, carry in
Outputs: sum, carry out
This is called a full adder
Will add x and y with a half-adder
Will add the sum of that to the carry in
Adding bigger binary numbers
A half adder has 4 logic gates
A full adder has two half adders plus a OR gate
Total of 9 logic gates
To add n bit binary numbers, you need 1 HA and n-1 FAs
To add 32 bit binary numbers, you need 1 HA and 31 FAs.
More about logic gates
To implement a logic gate in hardware, you use a transistor
Transistors are all enclosed in an “IC”, or integrated circuit
The current Intel Pentium IV processors have 55 million transistors!
Memory
A flip-flop holds a single bit of memory
The bit “flip-flops” between the two NAND gates
In reality, flip-flops are a bit more complicated
Have 5 (or so) logic gates (transistors) per flip-flop
Consider a 1 Gb memory chip.