Lec6_Org_SP 2025 Final C
Lec6_Org_SP 2025 Final C
Course Outline
Course Coordinator
Lecture 5
Assis. Prof. Dr. Elmahdy Maree
Lecture 3: Computer Organization and Architecture
Learning Objectives
Revision
Sequential circuits
Registers
Registers are a type of computer memory built directly into the processor or CPU (Central Processing Unit) that is used to store and
manipulate data during the execution of instructions. A register may hold an instruction, a storage address, or any kind of data
Buffer register.
Shift-right register.
Shift-left register.
Controlled buffer register with parallel load.
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
2024 / 2025
Zewail City of SMETnce and Technology MET
• A related circuit is a parallel-to-serial converter that loads N bits in parallel, then shifts them
out one at a time.
• A shift register can be modified to perform both serial-to-parallel and parallel-to-serial
operations by adding a parallel input DN−1:0, and a control signal Load.
• When Load is asserted, the flip-flops are loaded in parallel from the D inputs. Otherwise, the
shift register shifts normally.
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
2024 / 2025
Zewail City of SMETnce and Technology MET
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Counter
N-bit Counter:
• An N-bit binary counter is a sequential arithmetic circuit with clock and reset inputs and an N-bit output Q.
• Reset initializes the output to 0. (synchronous or asynchronous)
• The counter then advances through all 2N possible outputs in binary order, incrementing on
the rising edge of the clock.
A. Controlled Asynchronous Counter
Controlled ripple counter(up counter –ve edge)
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
B. Controlled Synchronous Counter Waveform for Ring counter
Ring Counter
Note: Many digital circuits participate during a computer run to fetch and execute instructions
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
X=X+1 Step 1
X=X+4 Step 4
4
2024 / 2025
Zewail City of SMETnce and Technology MET
Lecture Outline
• Arithmetic circuits
• Adders
• Arithmetic Logic Unit (ALU)
• Multipliers
• Dividers
• Number Systems
• Fixed point
• Floating point
• Floating point adder
• Sequential circuits
• Memories
• Bus system
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories
Digital systems also require memories to store the data used and generated by such circuits
• Registers built from flip-flops are a kind of memory that stores small amounts of data.
• 2N memory locations
• Each location stores M-bit
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories (Cont’d)
• RAM:
• RAM is volatile, meaning that it loses its data when the power is turned off
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories (Cont’d)
• Static RAM (SRAM)
• Static RAM stores data using a pair of cross-coupled inverters.
• Static because stored bits do not need to be refreshed
• The register file of the processor is built using SRAM
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories
• SAP 1 Memory
Static RAM with inverted control inputs
2024 / 2025
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories
SAM 1 Memory (Hardware Implementation)
The SAM-1 memory. Two 74189s are used to get a 16 x 8 memory. This means that we can store 16
words of 8 bits each.
Zewail City of SMETnce and Technology MET
Sequential circuits
Memories
• ROM
• ROM is nonvolatile, meaning that it retains its data indefinitely, even without a power
source.
• modern ROMs are not really read only; they can be programmed (written) as well. The
difference between RAM and ROM is that ROMs take a longer time to write but are
nonvolatile.
• It can be built using logic gates as shown in the following figure:
2024 / 2025
Zewail City of SMETnce and Technology MET
Memories
ROM
Ex: 4 x 3 ROM
Address Content
00 011
01 110
10 100
11 010
2024 / 2025
Computer Components: Top-Level View
Hypothetical Machine
Note that:
1. All data manipulations with RAM will
be through AC, IR directly
If PC=300 and the memory contents is as shown in the figure, show the contents of the
registers and memory during the execution of three consecutive instructions.