11 Arithmetic Logic Unit (ALU) Flashcards
What is the ALU?
Combinational circuit
It carries out arithmetic operations such as:
addition • subtraction • multiplication • others
It carries out logic operations such as:
AND, OR, NAND, etc • Comparisons (>=, ==, etc
It outputs status bits for the Flags/Status register to show:
Carry/borrow from add/subt operations
- Negative results from an operation
- Zero results from an operation
ALU symbol
The ALU employs the following for its operation:
Two N-bit data inputs, e.g, A and B inputs
- One N-bit data output, e.g., Y output
- A control input that specifies which operation to execute, e.g., F input
Example operations performed by the ALU?
Opcode
operation code used to let the ALU know what is the required operation.
Mnemonics,
easily remembered alphabetic code for the opcode. Mnemonic is used by the Engineer, but by the ALU.
machine language
ALU understand machine language
What is the status register?
The status register contains information about the state of the microprocessor after an operation has been executed.
The status register allows the program to take a certain action based on a particular condition that resulted from a previous instruction
Common flags?
The Common instruction set of the microprocessor? ALU or Register operation
Instruction Set of the microprocessor
What does an instruction set do/contain?
Example of 16 bit instruction format
Microoperations.
Instructions can be specified with a set of elementary/low-level operations know as Microoperations.
Microoperations are described using Register Transfer Notation (RTN) or Register Transfer Language (RTL).
Common microoperations?
LOADX
STOREX
ADDX
JUMPX
LOAD X
STORE X
ADD X
JUMP X
Assembler
Assembler programs are responsible for this conversion into machine language or machine code
Instruction storage format
Instruction format with two operands
RISC (Reduced Instruction Set Computer): A microprocessor with a small number of simple instructions.
- Large number of general purpose registers
- Simple instructions that execute quickly
- Each instruction performs one operation
- Instructions performs one operation
- Instructions have a fixed size
- Operations are performed between registers
CISC (Complex Instruction Set Computer): A microprocessor with a large number of instructions that perform complex computations.
Large number of instructions
Instructions of variable length
A single instruction performs multiple operations
Complex operations required more than one clock cycle
Require multiple clock cycles which slows down the performance
Multiplication in RISC?
Multiplication in CISC?
Abstraction: Assembly language
Assembly language
- Programming language
- Use of mnemonic and operands
- Opcode and address
Abstraction levels: Instruction set Architecture
Instruction Set Architecture
- Instructions that a computer is able to perform
- Each instruction is specified by microoperations
- Microoperations are low-level instructions represented with Register Transfer Notation
Abstraction Machine language/Code
Machine language/code
• Language compose of 0s and 1s that the computer is able to understandable