Professional Documents
Culture Documents
Part 2
1004QBT
Foundations of Computing
Systems
Lecture Objective
This week, well continue to look at
electrical circuits that would be used
inside your computer
Mwahahaha
QUIZ TIME!
Revision
LAST WEEK
Last Week
Boolean logic gates
AND
OR
NOT
NOR
NAND
XOR
Electromechanical
and logical circuits
Binary
mathematics
Decimal to binary
Binary to decimal
Binary addition,
subtraction,
multiplication,
division
Mathematical
circuits
Half-adder
Full-adder
Multiplexor
Computer memory
STORAGE CIRCUITS
Storage in a von
Neumann Machine
Feedback
To store information, circuits must
feedback into each other.
A set/reset (SR) latch does this using
two NOR gates
Nor gates: relay diagram of de Morgan variant, and both versions of logical
SR Latches in Operation
An SR latch with the reset line
moving from off to on
SR Latches in Operation
An SR latch with the reset line
moving from off to on
SR Latches in Operation
An SR latch with the set line
moving from off to on
SR Latches in Operation
An SR latch with the set line
moving from off to on
D-type Latch
NOT
switch
D-type Latch
There is one special
case where this D-type
latch wont work as we
expect.
Remember that in a
von Neumann
machine, calculations
had operands that
specified the register/s
to get data from, and
the register to store
data in.
NOT
Register
address
Unused
CPU Registers
We have now seen how to build CPU
registers.
To store 8 bits, you would use 8 Dtype flip-flops in parallel.
BOOLEAN SELECTION
Performing Computations
In a von Neumann machine, the instruction
register is connected to the other registers
and the ALU in such a way that entering
the instruction causes a cascade that
updates all relevant registers every clocktick.
During the fetch of the fetch-execute cycle,
an instruction is loaded into the instruction
register.
It then gets decoded.
The Decoder
Instructions are
entered as a binary
number.
Operations are built
into your computer as
circuits.
The decoder is a
circuit which takes
the input number and
uses it to activate a
particular output line.
Multiplexing
Once the decoder
has selected an
output, we can use
a multiplexor to
select one set of
data.
This data can come
from a register, or
be the output of an
operation.
Demultiplexing
We can also go the
opposite way,
using a
demultiplexor to
decide where to
send one bit of
data.
ALU
Multiplexor
Instruction Register
The op-code of the instruction
register is used to select an output
from an operations available on the
ALU.
The operands of the ALU are used to
select an input from the CPU
registers, to be fed into the ALU.
You now have everything you need to
build a CPU or a calculator!