106 Flashcards
What does ALU stand for?
An Arithmatic Logic Unit
What does an ALU do?
> Preforms arithmetic and logical operations on binary numbers
Typically there are 2 input numbers and a single output
Control bits are used to select which operation to carry out on the inputs
What is a BUS?
An example of a parallel connection
What are the conventions for drawing busses?
> Thick line
Black Arrows
Single lines crossed with diagonal lines
What are some Logic operations that can be accomplished with an ALU?
> Bitwise operations
Negation operations
Bit inverse clear operations
What are bitwise operations?
> Different logic gate functions. e.g. AND, OR etc
> Applied to bit pairs
What are negation operations?
> Inversion or complementing
> This can be done with logic gates in parallel
What are bit inverse clear operations?
> This is for ARM Processors
This is used to set any bit in a binary number to 0.
Two inputs: A (Binary number) & B (Used to select which bit is to be set to 0)
How it works:
B is inverted
An AND function is applied to both bits
A.!B
What are some Arithmatic operations that can be done on an ALU?
> Addition
Subtraction
Most ALU’s will implement a carry look-ahead adder because they are quicker than a ripple adder
Some microprocessors may also have hardware multipliers
How is binary subtraction done?
> Using ripple adders and 2s complement
If 2’s complement is applied to the second value then the two number can be added together and this produces the subtracted numbers.
Y = A + (-B)
Y = A + B ̅ + 1
How can 2’s complement be applied to a binary number for subtraction?
The second binary number is inverted (1’s Complement) and then when added with the first binary number the carry in on the ripple adder is set to 1
What is the 3rd type of operation that an ALU can preform?
A data movement operation
What decides what function an ALU preforms?
The control bits
What do the ALU control bits do?
Control various multiplexers in the ALU to route the bus to the correct operation
LEARN THE MULTIPLEXER ARCHETECTURE OF AN ALU
DO IT