Computer Architecture Notes
Computer Architecture Notes
Computer ?
A computer is a machine or device that performs processes, calculations and operations based on
instructions provided by a software or hardware program. It has the ability to accept data (input),
process it, and then produce outputs.
Combinational and sequential circuits can be used to create simple digital systems. These are the
low-level building blocks of a digital computer.
Simple digital systems are frequently characterized in terms of the registers they contain, and
the operations that they perform. Typically, What operations are performed on the data in the
registers What information is passed between registers
Microoperations:
Microoperations are the tiny, fundamental operations that happen within registers in a computer.
Think of them as the basic building blocks for handling data inside registers.
1. Shift: Shifting means moving the bits (0s and 1s) within a register to the left or right. It's like
rearranging the order of items in a line. This can be useful for things like scrolling text or
adjusting the position of binary data.
In summary, microoperations are small but crucial operations that happen within registers. They
include shifting data around, loading new data, clearing out old data, and incrementing values. These
microoperations are the nuts and bolts that help registers manage and process information
efficiently in a computer system.
Let's break down the organization of a digital system, including registers, microoperations, and
control signals, in a clear and concise manner:
a. Set of Registers and Their Functions: Registers are like tiny, super-fast storage units inside a
computer. Each register has a specific job. For instance:
b. Microoperations Set: Microoperations are the basic, fundamental operations that happen within
these registers. They include actions like:
c. Control Signals: Control signals are like the conductor's baton in an orchestra. They initiate and
coordinate the sequence of microoperations. When a computer needs to perform a specific task,
control signals orchestrate which microoperations happen in what order. It's like a series of well-
choreographed steps.
For example, if you want to add two numbers stored in registers, the control signals will tell the
computer to:
In summary, the internal organization of a computer is like an intricate dance. Registers hold data
and have specific jobs. Microoperations are the basic moves, and control signals are the cues that
guide the dance, ensuring everything happens in the right order to perform tasks efficiently and
accurately.
Register Transfer Level (RTL): When we look at a computer or any digital system from an RTL
perspective, we're zooming in on three crucial aspects:
1. The System's Registers: These are like the tiny, high-speed storage units within the
computer. Each register has a specific job, like holding data temporarily or storing addresses.
2. The Data Transformations: At the RTL, we're keenly focused on what happens to the data
inside these registers. It's like watching how numbers change and transform, whether
they're added, subtracted, or shifted around.
3. The Data Transfers: We pay close attention to how data moves between registers. Think of
this as tracking how information travels from one storage unit to another, like data moving
from memory to a processing unit.
In essence, Register Transfer Level is like getting up close and personal with a computer's inner
workings. It's all about registers, the transformations happening within them, and the way data
flows between them. This level of detail helps us understand how a digital system really operates.
Register Transfer Language (RTL): Instead of describing a digital system using plain words, we use a
specific notation called Register Transfer Language (RTL). It's like having a dedicated language for
talking about how a computer works internally.
Key Points:
1. Symbolic Language: RTL is a symbolic language, which means it uses symbols, codes, and
notations to represent actions and operations inside a digital system. It's like having a secret
code that only computer designers understand.
2. Describing Internal Organization: RTL is a handy tool for describing how the inside of a
digital computer is organized. It helps us explain what each part does and how they work
together, much like a blueprint for understanding a complex machine.
3. Facilitating Design: Not only does RTL help explain existing digital systems, but it's also
incredibly useful for designing new ones. Designers can use RTL to plan out how a digital
system will function before it's even built, like drawing a detailed map before going on a
journey.
Designation of Registers:
• Registers in a computer system are typically designated by capital letters, and sometimes
numbers may follow (e.g., A, R13, IR).
• These designations often hint at their functions or purpose within the system.
Examples:
• MAR (Memory Address Register): This register is responsible for holding memory addresses,
so it's labeled accordingly.
• Registers and their contents can be viewed and represented in various ways
• Register transfer refers to the process of copying the contents of one register to another.
• It's often represented as: R2 ← R1, which means that the data in register R1 is copied
(loaded) into register R2.
• During this operation, all bits from the source register R1 are simultaneously transferred to
the destination register R2, typically occurring in a single clock pulse.
Key Points:
• Simultaneous Transfer: Register transfer involves moving all the bits from one register to
another at the same time. It's like pouring the contents of one glass into another in one swift
action.
• Non-Destructive: Importantly, this process doesn't alter or destroy the data in the source
register (R1). It simply duplicates it into the destination register (R2), allowing both registers
to hold the same information.
In essence, register transfers are essential for managing data within a digital system. They ensure
that valuable information can be used in multiple parts of the system without losing or changing the
original data.
1. Data Lines: The digital system must have pathways, often referred to as data lines,
connecting the source register (R5) to the destination register (R3). These data lines are like
highways for bits to travel from one register to another.
2. Parallel Load in Destination Register: The destination register (R3) needs a mechanism for
parallel loading. This means that all the bits from the source register (R5) can be loaded into
the destination register at once. It's like pouring a full glass of water into an empty one
without spilling any drops.
3. Control Lines: There must be control lines or signals that initiate and coordinate this transfer
action. These control lines act like traffic signals, ensuring that the data transfer occurs
precisely when it should.
In summary, the register transfer R3 ← R5 tells us that the digital system has data lines connecting
the source and destination registers, a parallel loading mechanism in the destination register, and
control lines to execute this specific transfer action effectively. This orchestrated combination of
hardware elements enables the seamless movement of data within the digital system.
Control Functions in Digital Systems:
• Control functions in digital systems determine whether certain actions should take place
based on a specified condition, much like an "if" statement in programming.
• These control functions are often represented using a control signal, which is a single bit (0
or 1).
• If the control signal is 1, the associated action or operation is executed; if it's 0, the action is
skipped.
Representation:
• In this notation, P represents the control signal condition. If P is equal to 1, it means "if (P =
1)," and then the operation, which in this case is "load the contents of register R1 into
register R2," takes place.
In summary, control functions in digital systems allow actions to be conditionally executed based on
the state of a control signal. If the condition (control signal) is met (equal to 1), the specified
operation occurs; otherwise, it is skipped. This enables digital systems to make decisions and
perform actions based on specific criteria.
The representation P: R3 ← R5, MAR ← IR signifies that two operations are intended to occur
simultaneously if the control function P evaluates to 1. Here's a clear explanation:
• In digital systems, when you see multiple operations separated by commas, such as P: R3 ←
R5, MAR ← IR, it means these operations should occur concurrently, typically triggered by
the same clock signal if the control function P evaluates to 1.
• If P equals 1 (if the condition is met), then two actions take place simultaneously:
1. Load the contents of register R5 into R3. It's like pouring the contents of one glass
into another.
2. Load the contents of register IR into MAR. This is similar to copying the data from
one storage location to another.
This simultaneous execution of operations ensures efficient and coordinated processing within the
digital system. When the control function is true, both actions happen together, typically within the
same clock cycle, ensuring data consistency and synchronization.
A bus in the context of digital systems serves as a pathway, typically consisting of a group of wires,
over which information is transferred between various sources and destinations. Specifically, in
terms of transferring data from a register to the bus, it can be represented as:
• BUS ← R: This notation signifies that the contents of a register (in this case, R) are loaded
onto the bus, making the data available for transmission to other destinations or for further
processing.
The bus plays a central role in data movement within digital systems, enabling the efficient sharing
and transfer of information between different components, including registers, memory, and various
processing units.
memory (RAM) can be thought of as a sequential circuit consisting of a set of registers, each holding
words of data. Here's a breakdown of the components and requirements for such a memory:
Memory Organization:
• A RAM can be seen as a collection of registers, each designed to store a word of data.
• Each register has a unique address, and these addresses typically range from 0 to r-1, where
r is the total number of registers (words) in the memory.
1. Data Input Lines (n): These lines are used to input data into the memory.
They carry n bits of data at a time, allowing you to write information into
the memory.
4. Read Control Line: This control line is used to initiate the reading of data from the memory.
When activated, it signals the memory to fetch the data stored at the specified address and
place it on the data output lines.
5. Write Control Line: The write control line is used to initiate the writing of data into the
memory. When activated, it instructs the memory to accept and store data from the data
input lines at the specified address.
In summary, a RAM in a digital system is organized as a set of registers, and it requires specific lines
and control signals for data input, data output, address selection, and read/write operations. The
number of address lines k is determined by the size of the memory, which contains r = 2^k words.
• Memory is usually accessed by placing the desired memory address into a special register
known as the Memory Address Register (MAR) or sometimes simply referred to as the
Address Register (AR).
• The MAR is a dedicated register used to hold the memory address you want to access.
Accessing Memory:
• When you want to access a particular location in memory, you load the desired address into
the MAR.
• The contents of the MAR are then sent to the memory unit's address lines. These address
lines help identify the specific location in memory you want to read from or write to.
In essence, the MAR serves as a bridge between the CPU (Central Processing Unit) or other
processing units and the memory. It allows you to specify which memory location you want to
interact with, and the memory unit uses this address information to fetch or store data from or to
the specified location.
• To read a value from a memory location and load it into a register (let's say R1), you can
represent it in register transfer language as: R1 ← M[MAR].
1. The contents of the Memory Address Register (MAR) are sent to the memory unit's
address lines, indicating the specific memory location you want to read from.
2. A Read signal (typically set to 1) is sent to the memory unit, signaling that you intend
to read from that address.
3. The contents of the specified memory address are placed on the memory's output
data lines.
4. These data lines are then connected to the bus and sent to be loaded into the
designated register, which in this case is R1.
So, R1 ← M[MAR] succinctly represents the process of fetching data from memory, transferring it
over the bus, and loading it into the specified register, R1.
Writing from a Register (R1) to Memory:
• To write a value from a register (e.g., R1) to a specific location in memory, you can represent
it in register transfer language as: M[MAR] ← R1.
1. The contents of the Memory Address Register (MAR) are sent to the memory unit's
address lines, indicating the specific memory location where you want to write the
data.
2. A Write signal (typically set to 1) is sent to the memory unit, indicating that you
intend to write data to that address.
3. The values stored in register R1 are sent over the bus to the data input lines of the
memory.
4. These values are loaded into the specified memory address, effectively replacing any
previous data at that location.
So, M[MAR] ← R1 succinctly represents the process of writing data from the register R1 to the
specified memory location, based on the address stored in the Memory Address Register (MAR).
You've provided a set of register transfer language notations, and here's a clear and concise
explanation of each one:
1. A ← B: Transfer the content of register B into register A. This notation copies the data from
B to A.
2. AR ← DR(AD): Transfer the content of the AD (Address) portion of register DR into register
AR. This is often used to specify a memory address.
3. A ← constant: Transfer a binary constant into register A. This sets the value of register A to a
specific constant value.
4. ABUS ← R1, R2 ← ABUS: These two operations occur simultaneously. They transfer the
content of register R1 into bus A (ABUS), and at the same time, they transfer the content of
bus A (ABUS) into register R2.
5. AR: Represents the Address Register, which typically holds a memory address.
6. DR: Represents the Data Register, often used to store data before it's transferred to or from
memory.
7. M[R]: Denotes a memory word specified by the content of register R. This is used for
accessing memory locations.
8. M: Equivalent to M[AR], which means it represents the memory word specified by the
Address Register (AR).
10. M ← DR: Represents a memory write operation, transferring the content of the Data
Register (DR) into the memory word specified by the Address Register (AR).
Computer system microoperations can be categorized into four main types, each serving specific
purposes:
• These microoperations include operations like loading data from one register into
another, copying data between registers, and performing various data transfers.
2. Arithmetic Microoperations:
•
I'll explain the operation R3 ← R1 + R2' + 1 in the context of two's complement representation.
Two's Complement: Two's complement is a binary representation of signed integers that allows
both positive and negative values to be stored and manipulated using binary arithmetic. In two's
complement representation:
• Positive integers have the same binary representation as in unsigned binary (i.e., they start
with a 0 bit).
• Negative integers are represented as the two's complement of their absolute value.
• To subtract R2 from R1, we first compute the two's complement of R2. This involves
inverting (flipping) all the bits in R2.
• Then, we add 1 to the two's complemented value to account for the subtraction.
• This addition essentially performs subtraction in the two's complement form, which
is a convenient way to subtract numbers in binary.
The key concept here is that in two's complement representation, adding a negative
number (represented as the two's complement) is equivalent to subtraction. By
performing this addition and then transferring the result to R3, we effectively
compute the subtraction of R2 from R1.
This approach allows for efficient and consistent handling of both addition and
subtraction using binary arithmetic in digital systems, making it possible to perform
various mathematical operations, including signed arithmetic, with a common set of
hardware components.
3. Logic Microoperations:
• Logic microoperations involve logical operations on data, often used for data
manipulation and decision-making.
• These microoperations include operations like AND, OR, NOT, XOR, and various bit-
level manipulations.
Operation Description
• Shift microoperations involve shifting the bits of data within a register to the left or
right.
• They are commonly used for tasks like data reordering, multiplication or division by
powers of 2, and other bit-level operations.
In digital systems, a logical shift operation involves shifting the bits of a binary number either to the
left (logical shift left - shl) or to the right (logical shift right - shr) while introducing a 0 as the serial
input to the shift. Here's an explanation of each type of logical shift:
Logical Shift Left (shl):
• In a logical shift left operation, the bits of a binary number are shifted to the left.
• Each bit is moved to the left by one position, and a 0 is introduced as the new bit at the
rightmost position.
• This effectively multiplies the number by 2 for each shift left operation.
R2 ← shl R2
• This RTL notation represents that the contents of register R2 are shifted left by one bit
position.
• In a logical shift right operation, the bits of a binary number are shifted to the right.
• Each bit is moved to the right by one position, and a 0 is introduced as the new bit at the
leftmost position.
• This effectively divides the number by 2 for each shift right operation.
R3 ← shr R3
• This RTL notation represents that the contents of register R3 are shifted right by one bit
position.
Logical shifts are commonly used in digital systems for various purposes, such as data manipulation,
division and multiplication by powers of 2, and bit extraction. They are fundamental operations in
digital circuitry and microprocessor architectures.
In digital systems, a circular shift operation involves shifting the bits of a binary number either to the
left (circular shift left - cil) or to the right (circular shift right - cir) while introducing the bit that is
shifted out of one end as the serial input to the other end. Here's an explanation of each type of
circular shift:
• In a circular shift left operation, the bits of a binary number are shifted to the left.
• Each bit is moved to the left by one position, and the bit that is shifted out from the leftmost
end is introduced as the new bit at the rightmost end.
• This operation effectively rotates the bits within the register, and no bits are lost.
R2 ← cil R2
• This RTL notation represents that the contents of register R2 are circularly shifted left by one
bit position.
• In a circular shift right operation, the bits of a binary number are shifted to the right.
• Each bit is moved to the right by one position, and the bit that is shifted out from the
rightmost end is introduced as the new bit at the leftmost end.
• Similar to a left circular shift, this operation effectively rotates the bits within the register,
and no bits are lost.
R3 ← cir R3
• This RTL notation represents that the contents of register R3 are circularly shifted right by
one bit position.
Circular shifts are used in digital systems when you want to rotate the bits within a register while
preserving all bits in the process. They are often used in cryptographic algorithms, data encryption,
and when implementing circular buffers or data structures.
1. Logical Shift:
• In a logical shift operation, the newly created bit position (either on the left or right,
depending on the shift direction) is filled with a zero.
•
• This means that regardless of whether it's a logical shift left (shl) or logical shift right
(shr), a zero is introduced into the newly vacated bit position.
2. Arithmetic Shift:
• In an arithmetic shift operation, the newly created bit position (again, left or right,
depending on the shift direction) is filled with a copy of the number's sign bit.
• If the number is positive (the sign bit is 0), the newly introduced bit is 0. If the
number is negative (the sign bit is 1), the newly introduced bit is 1.
•
• This behavior helps preserve the sign of the number when shifting, making
arithmetic shifts suitable for signed integers.
Arithmetic shifts are commonly used in signed integer operations to maintain the correct sign bit
and to perform division or multiplication by powers of 2 while preserving the sign. Logical shifts, on
the other hand, are often used for simple data manipulation and bit extraction, where the sign is not
a consideration.
These microoperations are essential building blocks of digital systems and play a critical role in
processing data and control within a computer system. They enable the manipulation,
transformation, and storage of information necessary for various computational tasks.
1. Instruction Code:
• It serves as the command to the computer's central processing unit (CPU) to execute
a particular action or task.
• It is a group of bits within the instruction that specifically defines the operation to be
performed.
• The CPU uses the OpCode to determine the type of operation it needs to execute.
3. Operands:
• Operands are components of the instruction that indicate the source(s) and
destination(s) of data for the operation.
• Registers are internal storage locations within the CPU, while memory addresses
refer to locations in the computer's main memory (RAM).
• Operands tell the CPU where to fetch data from and where to store the result after
the operation is performed.
In summary, an instruction code consists of OpCode and operands. The OpCode specifies the
operation to be performed, while operands indicate the data sources and destinations for that
operation. This structure allows the CPU to execute a wide range of tasks based on the instruction
codes it receives, making it a fundamental concept in computer architecture and programming.
1. Storage of Instructions:
• Instructions in a computer are stored in memory, typically in the same way that data
is stored.
• The instructions are represented in binary form, with each instruction having its
unique bit pattern.
• The control unit, a fundamental component of the CPU (Central Processing Unit),
plays a vital role in interpreting and executing instructions.
• When the CPU fetches an instruction from memory, the control unit decodes it to
understand the intended operation.
• The operation code (opcode) within the instruction is used by the control unit to
determine the type of operation to be performed.
3. Sequences of Microoperations:
• Once the opcode is identified, the control unit uses it to determine the sequences of
microoperations that must be executed to carry out the instruction's intended task.
• The control unit coordinates the execution of the instruction by generating control
signals.
• These control signals activate specific components of the CPU, including registers,
ALUs (Arithmetic Logic Units), and data buses, to perform the microoperations
required by the instruction.
• Data may be fetched from registers or memory, manipulated, and then stored back
in registers or memory as necessary to complete the instruction.
In essence, the control unit's role is pivotal in executing instructions. It translates the instructions,
extracts the operation code, and orchestrates the sequence of microoperations needed to carry out
the instruction, ensuring that the computer performs the desired tasks as specified by the program.
Operand Specification:
• These k bits allow the instruction to identify one of 2^k possible registers or memory
locations.
2. The Accumulator Design:
• One common design approach is to include a special processor register known as the
"accumulator."
• Opcode Field: This field contains the operation code (opcode) that specifies
the type of operation to be performed.
• The operand field can be further divided to specify either a register or a memory
location.
• One advantage of this design is that instructions that do not require a memory
operand can make use of the operand bits for other purposes.
• For example, these bits can be used to specify different operations or to provide
additional control information.
•
In summary, operand specification in computer instructions involves allocating bits to identify
registers and memory locations. The use of an accumulator and flexible operand field design allows
for efficient and versatile instruction formats that can represent a wide range of operations and
addressing modes within a computer's architecture.
1. Direct Operand:
• A direct operand refers to an operand whose data is stored directly in the specified
register or memory location.
• In other words, the instruction uses the content of the specified register or memory
location as the operand for the operation.
• For example, if you have an instruction like "ADD R1, R2," R1 and R2 are direct
operands, and the operation involves adding the contents of R2 to R1.
2. Indirect Operand:
• Instead of directly containing the data, this operand contains a reference (address)
to the location where the data can be found.
• To access the actual data, the instruction must first follow the reference to the
correct location.
3. Immediate Operand:
• It does not reference a register or memory location but provides a constant value
that is used as an operand for the operation.
• Immediate operands are useful for instructions that involve constants or values that
are known at compile time.
4. Register Operand:
• Register operands are often used for fast and efficient data manipulation since
register access is typically faster than memory access.
These different types of operands allow instructions to be versatile and adaptable to various
computational tasks and data storage requirements in computer programs. The choice of operand
type depends on the specific needs of the instruction and the architecture of the computer system.
• The Program Counter is a special register that stores the memory address of the
next instruction to be executed.
• It ensures that instructions are fetched and executed sequentially, one after the
other.
• The Memory Address Register (MAR) is a register used to store the memory address
from which data or an instruction needs to be read or to which data needs to be
written.
• The Memory Buffer Register (MBR) is a register used to temporarily hold the data or
instruction being read from or written to memory.
• Together, MAR and MBR facilitate the transfer of data between the CPU and
memory.
• These registers are not tied to specific functions and are available for various data
manipulation operations.
• They play a crucial role in executing arithmetic, logical, and data transfer operations.
• The Instruction Register (IR) is a special register that holds the current instruction
being executed by the CPU.
• During the execution of an instruction, the IR stores the opcode and operand
information, facilitating the decoding and execution of the instruction.
• Input and Output Registers are used for temporary storage of data during input and
output operations.
• When data is read from an input device (e.g., keyboard), it is temporarily stored in
an input register before being processed.
• Similarly, data to be written to an output device (e.g., display) is temporarily held in
an output register before being sent out.
These registers and components work together to enable the fetch-decode-execute cycle of
computer instructions. The program counter ensures sequential execution, memory address and
data registers facilitate memory access, temporary data registers hold intermediate values, the
instruction register manages the currently executing instruction, and input/output registers aid in
data transfer between the CPU and external devices.
1. Common Bus:
• To reduce the complexity of wiring, memory, and registers are connected through a
common bus.
• The common bus serves as a communication pathway for data transfer between
various components of the computer, including registers and memory.
2. Bus Selection (S2S1S0):
• The specific output selected on the common bus is determined by a set of control
lines denoted as S2, S1, and S0.
• These control lines determine which register's data or which memory location's data
is placed on the bus.
• Registers can be loaded with data from the bus when their respective load (LD)
control input is enabled.
• Registers can also be incremented by setting the INR control input or cleared by
setting the CLR control input.
• These control signals allow for data manipulation and transfer within the registers.
• Such data swaps are essential for various arithmetic and logical operations.
5. Address Register:
• When accessing a specific memory location, the address of that location must be
loaded into the Address Register.
• The Address Register specifies which memory location will be read from or written
to during memory operations.
These principles are fundamental to the organization and operation of a computer's central
processing unit (CPU) and memory subsystem. They allow for efficient data movement,
manipulation, and control during program execution, contributing to the functionality and versatility
of digital computers.
clear description of the three instruction code formats used in a basic computer architecture. Let's
summarize and elaborate on each of these formats:
1. Memory-Reference Format:
• It consists of:
• Seven 3-bit opcodes: These opcodes specify the type of memory operation
to be performed (e.g., load, store, compare).
• A 12-bit memory address: This field contains the memory address where the
operation will take place.
• A bit indicating addressing mode: This bit distinguishes between direct and
indirect addressing, allowing for flexibility in memory access.
2. Register-Reference Format:
• It consists of:
• In this format, one or more of the lower 12 bits are set to identify the source and
destination registers, specifying the operation to be carried out.
3. Input-Output Format:
• This format is used for input and output (I/O) instructions.
• It consists of:
• Similar to the register-reference format, only one of the lower 12 bits is typically set
to identify the specific I/O operation.
These instruction code formats provide a structured and standardized way to represent different
types of instructions in a computer's architecture. Memory-reference format deals with memory
access, register-reference format with register operations, and input-output format with I/O
operations. The use of distinct opcodes and address fields allows the CPU to interpret and execute
instructions accurately based on their formats and content.
• Logical instructions perform operations like AND, OR, XOR, and NOT.
• Shift instructions are used for bit-level operations such as shifting left or right.
• These instructions facilitate the movement of data between registers and memory,
as well as between different registers.
• They include load (move data from memory to register), store (move data from
register to memory), and register-to-register transfer instructions.
• These instructions are responsible for controlling the flow of program execution and
managing the status of the CPU.
• Status-checking instructions enable the CPU to check and set various flags or
condition codes that influence program flow.
• Input and output instructions are vital for communication between the computer
and external devices.
• Input instructions allow data to be read from input devices (e.g., keyboards or
sensors) into the computer.
• Output instructions enable data to be sent from the computer to output devices
(e.g., displays or printers).
A complete instruction set ensures that the computer can perform a wide range of tasks and
operations, making it versatile and capable of executing a variety of programs. It allows
programmers to write efficient and comprehensive software for different applications while taking
advantage of the full capabilities of the hardware.
1.
Data Moves (LDA and STA):
• The LDA (Load Accumulator) and STA (Store Accumulator) instructions provide the
capability to move data between memory and the accumulator (a CPU register).
• LDA loads data from memory into the accumulator, while STA stores the
accumulator's content back into memory.
• These instructions are fundamental for data transfer between memory and the CPU.
• Control flow instructions are crucial for managing program execution. You've
mentioned several types:
• Subprogram Calls (BSA): Subprogram calls are used for invoking subroutines
or functions within a program, enabling modular and structured
programming.
• Conditional Branch (ISZ): Conditional branching allows the program to make
decisions based on a condition, typically involving the incrementation of a
value and checking for zero.
• Input and output instructions are essential for communication between the
computer and external devices. These instructions facilitate the transfer of data to
and from devices such as keyboards, displays, printers, and more.
Overall, the combination of data movement, control flow, input/output, and interrupt handling
instructions forms a comprehensive set of capabilities necessary for a computer to execute a wide
range of programs and interact with its environment effectively. These instructions are fundamental
building blocks for software development and system operation.
•
• It generates regular clock pulses that serve as the fundamental timing reference for
the entire computer system.
• The clock pulses from the master clock generator are applied to all registers and flip-
flops in the system, including those within the control unit.
• Flip-flops and registers rely on these clock pulses for proper data storage and
processing.
1. Precise timing and control mechanisms, facilitated by the master clock generator and control
unit, are crucial for the coordinated and synchronized operation of a digital computer. They
ensure data is processed accurately and efficiently, contributing to the overall reliability and
functionality of the system.
1) Hardwired Control:
• In hardwired control, control logic is implemented using digital circuits such as gates,
flip-flops, decoders, multiplexers, and other combinational and sequential logic
components.
• The control signals are generated directly by the wired connections between these
components based on the instruction being executed.
• Hardwired control is typically faster and more efficient for simple instruction sets or
architectures with fixed and straightforward control sequences.
2. Microprogrammed Control:
• The control memory contains microinstructions, which are small programs that
specify the sequence of microoperations to execute for each instruction.
• A control unit fetches microinstruction from the control memory and interprets
them to generate the necessary control signals.
• Microprogrammed control offers flexibility and ease of modification because
changes to the control behavior can be made by updating the microcode in the
control memory.
The choice between hardwired and microprogrammed control depends on various factors, including
the complexity of the instruction set, the desired level of flexibility, ease of modification, and the
specific requirements of the computer architecture. Both approaches have their advantages and
trade-offs, and designers select the most suitable one based on the intended use and design goals.
• Timing signals are essential for controlling the sequence of operations in a digital
system.
• These signals dictate when specific actions or microoperations should occur during
the execution of instructions.
Key phases within the instruction cycle, which is a fundamental concept in computer architecture
and the execution of programs. Here's a breakdown of each phase:
• In this phase, the computer retrieves the next instruction to be executed from its
memory (often referred to as the instruction memory or program memory).
• The instruction is fetched based on the current program counter (PC) value, which
points to the address of the next instruction in memory.
• After fetching the instruction, the computer's control unit decodes it.
• In this phase, the CPU may calculate the effective address or retrieve it from
memory.
• The execution phase is where the actual operation specified by the instruction is
carried out.
• This can involve various actions such as arithmetic calculations, data transfers
between registers and memory, logical operations, branching, and more, depending
on the instruction's purpose.
These phases together constitute the instruction cycle, which is repeated for each instruction in a
program. It ensures that instructions are fetched, decoded, and executed in a systematic and
controlled manner, enabling the computer to perform the desired tasks as outlined in the program's
instructions.
Hardwired Control Unit Microprogrammed Control Unit
Hardwired control unit generates the control Microprogrammed control unit generates
signals needed for the processor using logic the control signals with the help of micro
circuits instructions stored in control memory
Difficult to modify as the control signals that need Easy to modify as the modification need to
to be generated are hard wired be done only at the instruction level
Only limited number of instructions are used due Control signals for many instructions can
to the hardware implementation be generated
Used in computer that makes use of Reduced Used in computer that makes use of
Instruction Set Computers(RISC) Complex Instruction Set Computers(CISC)