Computer Architecture
Computer Architecture
Example:
-R1 ← R2` means "transfer the contents of register R2 into register R1."
-M[100] ← R1` means "transfer the contents of register R1 into memory location 100."
-R1 ← R2 + R3` means "store the sum of registers R2 and R3 into register R1."
In RTL, there is a clear definition of data movement, arithmetic operations, and control
signals in a succinct form.
2.Register Transfer:
- Aregister transfer refers to the movement of data between registers or from a register to
memory. It describes how data is transferred from one register to another or to/from memory
using control signals.
- Registers are small, fast storage locations inside the CPU. Each register typically holds
one piece of data, and data is moved between registers in different operations.
Example:
-R1 ← R2` (Copy the content of register R2 into register R1).
-R1 ← M[100]` (Copy the data stored at memory address 100 into register R1).
- This can also be part of more complex instructions like adding contents from two
registers and storing the result.
In the context of registers, a bus allows registers to communicate with each other without
needing separate direct connections for each pair.
4.Memory Transfers:
Memory transfers specify operations to read from or write to memory.
Memory Read: When data is read from memory, it’s transferred to a register. Control
signals are used to specify the memory address and indicate that data should be read.
Example:R1 ← M[100]` means "read data from memory location 100 and store it in
register R1."
Memory Write: When data is written to memory, it’s transferred from a register to the
memory location. The control signals direct the data flow.
Example:M[200] ← R1` means "write the contents of register R1 into memory location
200."
5.Micro-Operations:
Micro-operations are the smallest unit of operation in a digital system. They describe
low-level operations that occur within a register or between registers, and typically occur in
response to an instruction.
Register Transfer Micro-Operations: This is the basic operation of moving data between
registers.
- Example:R1 ← R2` means copying the contents of register R2 to register R1.
Logic Micro-Operations: These involve logical operations such as AND, OR, and NOT.
Example:R1 ← R1 AND R2` means perform a bitwise AND operation between the
contents of R1 and R2 and store the result back in R1.
Shift Micro-Operations: These involve shifting the contents of a register to the left or right.
Example:R1 ← R1 << 1` means shift the bits of R1 one position to the left (equivalent to
multiplying by 2).
- Shifts are useful for certain arithmetic and logical operations.
6.Binary Adder:
- Abinary adder is a digital circuit that adds two binary numbers.
- It takes two binary inputs (each bit is either 0 or 1) and performs the addition bit by bit,
accounting for carries (overflows from one bit position to the next).
- A simple1-bit full adder has three inputs: two bits to add and a carry input, and two
outputs: the sum and a carry output. These can be extended to multi-bit adders by chaining
several 1-bit full adders.
7.Binary Adder-Subtractor:
- Abinary adder-subtractor circuit can perform both addition and subtraction operations on
binary numbers.
- It uses thetwo's complement method for subtraction, which involves inverting the bits of
the second operand and adding 1.
- By selecting a control signal, the circuit switches between addition and subtraction.
- Thesign bit determines whether the result is positive or negative, and the system handles
overflow using additional bits.
8.Binary Incrementer:
- Abinary incrementer is a circuit that adds the binary value 1 to the number stored in a
register.
- It is used to increment counters or addresses in a system.
- The incrementer uses an adder that adds 1 to the contents of the register. It may also
handle carry propagation when the increment results in a carry-out (overflow).
Selective Set: Set a specific bit of a register to 1, leaving other bits unchanged.
Example: To set bit 3 of a register R1, the operation would look likeR1 ← R1 | (1 << 3)`.
These operations are used extensively in control circuits and for efficient manipulation of
data at the hardware level, enabling tasks like bit-level encryption, address manipulation,
and flag management.