Professional Documents
Culture Documents
UNIT 1 – Lecture 4
Microoperations
• The operations on the data in registers are called
microoperations.
• The functions built into registers are examples of
microoperations
• Shift
• Load
• Clear
• Increment & many more
Microoperations
1 clock cycle
R ← f(R, R)
f: shift, load, clear, increment, add, subtract, complement,
and, or, xor, …
02/24/2023 @ Aditya Tandon
Slide: 5
Registers
Digital Module
Operations performed on
the data stored in them
• Modules are interconnected with common data and control paths to form a digital
computer system.
02/24/2023 @ Aditya Tandon
Slide: 8
Designation of Registers
Designation of Registers
MAR
Designation of Registers
• Designation of a register
• A register
• Portion of a register
• A bit of a register
• Common ways of drawing the block diagram of a register
Register Showing individual bits
R1 7 6 5 4 3 2 1 0
15 0 15 8 7 0
R2 PC (H) PC (L)
Numbering of bits Subfields
02/24/2023 @ Aditya Tandon
Slide: 13
Register Transfer
Register Transfer
Control Functions
Control Functions
• Which means “if P = 1, then load the contents of register R1 into register
R2”, i.e., if (P = 1) then (R2 ← R1)
Simultaneous Operations
• If two or more operations are to occur simultaneously, they are
separated with commas
P: R3 ← R5, MAR ← IR
Connecting Registers
Connecting Registers
Bus lines
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
B 1 C 1 D 1 B2 C 2 D 2 B 3 C 3 D 3 B 4 C 4 D 4
0 0 0 0
4 x1 4 x1 4 x1 4 x1
MUX MUX MUX MUX
x
select
y
4-line bus
Load
Reg. R0 Reg. R1 Reg. R2 Reg. R3
D D D D
0 1 2 3
z
Select 2x4 E (enable)
w
Decoder
S0 0
Select 1
S1 2
Enable 3
Memory (RAM)
Memory (RAM)
• Each register (word) can hold n bits of data.
• Assume the RAM contains r = 2k words. It needs the following
• “n” data input lines data input lines
Memory Transfer
Memory Transfer
Memory Read
• To read a value from a location in memory and load it into a register, the
RTL notation looks like this:
R1 ← M[MAR]
• This causes the following to occur:
• The contents of the MAR are sent to the memory address lines
• A “Read” (=1) signal is sent to the memory unit.
• The contents of the specified address are put on the memory’s output data lines
• These are sent over the bus to be loaded onto register R1.
Memory Write
• To write a value from a register to a memory location, the RTL notation
looks like this:
M[MAR] ← R1
• This causes the following to occur:
• The contents of the MAR are sent to the memory address lines
• A “Write” (=1) signal is sent to the memory unit.
• The contents of R1 are sent over the bus to the memory’s input data lines
• The values are then loaded onto the specified address in the memory.
Important Questions
• A CPU has 24-bit instructions. A program starts at address 300 (in decimal). What are the possible values of
legal program counter?
• What is memory transfer? What are different registers associated for memory transfer? Discuss.
• Draw the block diagram of the following register transfer statement :-
xyT0: R2 R1, R1 R2
• Draw the bus system of four registers of 4 bit each? Explain it.
• Represent the following conditional control statement by two register transfer statements with control
functions: if (P=1) then (R1 R2) else if (Q =1) then (R1 R3)
• Explain the memory operations for the following:
• R2 M [AR]
• M[AR] R3
• R502/24/2023
M [R5] @ Aditya Tandon
Slide: 35