39 terms

CS 311 - Computer Architecture

PLAY
Boolean Algebra
is a mathematical system for the manipulation of variables that can have one of two values
* In formal logic, the values are "true" and "false"
* In digital systems, the values are "on" and "off" or "1" and "0"
* Boolean expressions are created by performing operations on Boolean variables
* Common operators include AND, OR, and NOT
* A Boolean operator can be completely described using a truth table
A Boolean function has:
At least one Boolean variable
At least one Boolean operator, and
At least one input from the set {0, 1}
It produces an output that is also a member of the set {0, 1}
Boolean rules of precedence:
1. NOT
2. AND
3. OR
Digital computers contain circuits that implement Boolean functions
The simpler that we can make a Boolean function, the smaller the circuit that will result
• Simpler circuits are cheaper to build, consume less power, and run faster than complex circuits
• With this in mind, we always want to reduce our Boolean function to their simplest form
Identity law:
• 1x = x (AND form)
• 0 + x = x (OR form)
Null law:
• 0x = 0 (AND form)
• 1 + x = 1 (OR form)
Idempotent law:
• Xx = x (AND form)
• X + x = x (OR form)
Inverse law:
• Xx' = 0 (AND form)
• X + x' = 1 (OR form)
Commutative Law
• xy = yx
• x+y = y+x
Associative Law
• (xy)z = x(yz)
• (x+y)+z = x +(y+z)
Distributive Law
• x+yz = (x+y) (x+z)
• x(y+z) = xy+xz
Absorption Law
• x(x+y) = x
• x+xy = x
DeMorgan's Law
• (xy)' = x' + y'
• (x+y)' = x'y'
Double Complement Law
• (x)'' = x
Sometimes it is more economical to build a circuit using the complement of a function ( and complementing its result) than it is to implement the function directly
• DeMorgan's law provides an easy way of finding the complement of a Boolean function
DeMorgan's law state:
(xy)' = x' + y' and (x+y)' = x'y' (works for any number of products
DeMorgan's can be extended to any number of variables
o F(x,y,z) = (xy) + (x'y) + (xz')
F'(x,y,z) = ( (xy) + (x'y) + (xz') )' = (xy)'(x'y)'(xz')' = (x'+y')(x+y')(x'+z)
Through our exercises in simplifying Boolean expressions, we see that there are numerous ways of stating the same Boolean expression.
These forms are logically equivalent
Logically equivalent expressions have identical truth tables
In order to eliminate as much confusion as possible, designers express Boolean functions in standardized or canonical form.
• There are two canonical forms for Boolean expressions: sum-of-products and product-of-sums.
In the sum-of-products form, ANDed variables are ORed together.
For example: F(x,y,z) = xy + xz + yz
In the product-of-sums form, ORed variables are ANDed together:
For example: F(x,y,z) = (x+y) (x+z) (y+z)
(SUM-OF-PRODUCTS)
• It is easy to convert a function to sum-of-products form using its truth table
• We are interested in the values of the variables that make the function true(=1)
• Using the truth table, we list the values of the variables that result in a true function value
• Each group of variables is then ORed together
Gates
• Boolean functions are implemented in digital computer circuits called gates
A gate
is an electronic device that produces a result based on input values
o In reality, gates consist of one to six transistors, but digital designers think of them as a single unit.
o Integrated circuits contain collections of gates suited to a particular purpose
XOR
• The output of the XOR operation is true only when the values of the inputs differ
o X XOR Y
X Y XXORY
0 0 0
0 1 1
1 0 1
1 1 0
X NAND Y
X Y X NAND Y
0 0 1
0 1 1
1 0 1
1 1 0
X NOR Y
X Y X NOR Y
0 0 1
0 1 0
1 0 0
1 1 0
Universal gates
NAND and NOR are known as universal gates because they are inexpensive to manufacture and any Boolean function can be constructed using only NAND or only NOR gates
Three input gate
Gates can have multiple inputs and more than one output.
Combinational logic circuits
produce a specified output (almost) at the instant when input values are applied.
• Combinational logic circuits give us many useful devices
finds the sum of two bits
• As we see the sum can be found using the XOR operation and the carry using the AND operation
Decoders
are another important type of combinational circuit
• Among other things, they are useful in selecting a memory location according a binary value placed on the address lines of memory bus
multiplexer
does just the opposite of a decoder.
• It selects a single output from several inputs
• The particular input chosen for output is determined by the value of the multiplexer's control lines
• To be able to select among n inputs, log2n control lines are needed
shifter
moves the bits of a nibble one position to the left or right
Combinational logic circuits(2)
are perfect for situations when we require the immediate application of a Boolean function to a set of inputs.
• There are other times, however, when we need a circuit to change its value with consideration to its current state as well as its inputs.
o These circuits have to "remember" their current state
Sequential logic circuits
• AS the name implies, sequential logic circuits require a means by which events can be sequenced.
• State changes are controlled by clocks.
o A "clock" is a special circuit that sends electrical pulses through a circuit
• Clocks produce electrical waveforms
• State changes occur in sequential circuits only when the clock ticks
• Circuits can change state on the rising edge, falling edge, or when the clock pulse reaches its highest voltage
edge-triggered
• Circuits that change state on the rising edge, or falling edge of the clock pulse are called
Level-triggered
circuits change state when the clock voltage reaches its highest or lowest level
feedback
To retain their state values, sequential circuits rely on
• Feedback in digital circuits occurs when an output is looped back to the input