Professional Documents
Culture Documents
Number Systems
Generalizations: 1. There is no number system with a base of 1 2. The no. of symbols in any number system is the radix (base) 3. The highest symbol in any number system is equal to radix -1 4. The highest symbol plus 1 equals 0 with carry 1
Decimal System - said to be of base 10 because it uses 10 digits and the coefficients are multiplied by powers of 10
Ex: 11010.11
Ex: 7392
Augend
Addend
1010100
Subtraction
101101 100111 Minuend Subtrahend
000000
Multiplication
1011 101 Multiplicand Multiplier
110111
Number Systems
Binary Codes
Bit - binary digit - to represent a group of 2n distinct elements in a binary code requires a minimum of n bits - it is possible to arrange n bits in 2n distinct ways
N=2 2 n = 22 = 4 00,01,10,11
Decimal Codes
BCD - Binary Coded Decimal - a straight assignment of the binary equivalent - it is possible to arrange n bits in 2n distinct ways - difference between conversion of a decimal number to binary and the binary coding of a decimal number
Ex. 13 BCD
Binary
0001
0011
1101
Decimal Digit
0 1
BCD
0000 0001
Excess 3
0011 0100
2
3 4
0010
0011 0100
1010
0110 0111
5
6 7
0101
0110 0111
1000
1011 1010
8
9
1000
1001
1011
1100
Reflected Code Gray Code - a number in the reflected code changes by only one bit as its provides from one number to the next
Alphanumeric Codes - binary code of a group of elements consisting of the 10 decimal digits, the 26 letters of the alphabet and a certain number of special symbol such as $
Number Systems
ASCII American Standard Code for Information Interchange
Number Systems
EBCDIC Extended Binary Coded Decimal Interchange Code
Truth Table - a table that shows all input and output possibilities for a logic circuit
X 0 0 Y 0 1 Z 0 0
1 1
0 1
0 1
1 1
0 1
1 1
if:
X = 1 then Z = 0 X = 0 then Z = 1
X 0 Z 1
Logic Gates
Electronic Digital Circuits Logic Circuits Block of hardware that produces a Logic 1 or Logic 0 output signal if input logic requirements are satisfied Digital Circuits Switching Circuits
X
0 0 1 1 2. NAND Function - complement of AND - abbreviation of Not-AND
Y
0 1 0 1
F
1 0 0 0
X 0
0 1 1
Y 0
1 0 1
F 1
1 1 0
0
1 1
1
0 1
1
1 0
4. Equivalence or Exclusive NOR or Exclusive OR-Not - a function that is 1 when the 2 binary variables are equal i.e. when both are o or both are 1. X Y F
0
0
0
1
1
0
1
1
0
1
0
1
NOR
NAND
XOR
XNOR
Boolean Algebra
2. X + X = 1
3. X + X = 1 4. X + 1 = 1
; X . X = 0
;X.X=X ;X.0=0
5. (X) = 1
6. X + Y = Y + X ; XY = YX 7. X + (Y + Z) = (X + Y) + Z 8. X (Y + Z) = XY + YZ ; X(YZ) = (XY)Z ; X + YZ = (X + Y) (X + Z)
Involution
Commutative Associative Distributive
9. (X + Y) = XY
10. X + XY = X
; (XY) = X + Y
; X (X + Y) = X
De Morgans
Absorption
BOOLEAN FUNCTIONS
Binary variable can take the value of 0 or 1. A Boolean function is an expression formed with binary variables, the two binary operators OR and AND. Ex. F = xyz + xyz + xy F = (A + B)(A+C)
MINTERMS
MINTERMS
Ex. Consider two binary variables x and y combined with an AND operation: Since, each variable may appear in either form, there are 4 possible combinations. (from 2n. Where n is the no. of variables) xy xy
x y
xy Each of these four AND terms are called minterm or a standard product
MAXTERMS
A variable forming an OR terms Primed variables corresponds to a binary number 1 Unprimed variables corresponds to a binary number 0
0
0 0 0
0
0 1 1
0
1 0 1
xyz
xyz xyz xyz
0
0 0 0
0
0 1 1
0
1 0 1
x+y+z
x+y+z x+y+z x+y+z
M0
M1 M2 M3
1
1 1
0
0 1
0
1 0
xyz
xyz xyz
1
1 1
0
0 1
0
1 0
x+y+z
x+y+z x+y+z
M4
M5 M6
xyz
m7
x+y+z
M7
SUM OF MINTERMS
Boolean function can be expressed as a sum of minterms. The minterms whose sum defines the Boolean function are those that give the 1s of the function in a truth table.
Example
Express the Boolean function F = A + BC in a sum of minterms.
0 0
0 0 1
0 0
1 1 0
0 1
0 1 0
ABC ABC
ABC ABC ABC
m1
m2 m3 m4 m5
1
0 0 1 1
1 1
1
0 1
1
1 0
1
ABC ABC
ABC
m6
m7
1
1
PRODUCT OF MAXTERMS
To express the Boolean function as a product of maxterms, it must first be brought into a a form of OR terms. This may be done by using the distributive law, x + yz = (x + y)(x + z) Then, any missing variable n in each OR term is Ored with nn .
EXAMPLE
Express the Boolean function F = xy + xz in a product of maxterm form.
Example:
F(A, B, C) = (1, 4, 5, 6, 7)
KARNAUGH MAP
MAP METHOD
First proposed by Veitch and modified by Karnaugh, is also known as the Veitch Method or the Karnaugh Map
The map is a diagram made up of squares. Each square represents one minterm.
MAP METHOD
Advantages:
Presents a visual diagram of all possible ways a function may be expressed in a standard form. Derive alternative algebraic expressions for same function
MAP METHOD
Types of Maps
2-Variable Map 3-Variable Map 4-Variable Map
2-VARIABLE MAP
There are four minterms for two variables. The map consists of four squares, one for each minterm.
x y 0 1
m0
m1
m0
m1
m2
m3
m2
m3
2-VARIABLE MAP
Example: Represent F = x + y using K-map. Soln: F = x(y + y) + y (x + x) = xy + xy + xy + xy F = xy + xy + xy = m1 + m2 + m3
2-VARIABLE MAP
the function x + y is represented in the map by three squares marked with 1s.
x 0
y y
0
m0
1
m1
x 0
1
1
m2
m3
3-VARIABLE MAP
There are 8 minterms for three binary variables. Map consists of eight squares
yz
x 0
00 m0 m4
01 m1 m5
11 m3 m7
10 m2 m6
3-VARIABLE MAP
Simplify the Boolean function
F(x, y, z) = (2, 3, 4, 5)
yz x 0
00
01
11 1
10 1
F = xy + xy
3-VARIABLE MAP
Simplify the Boolean function F(x, y, z) = (3, 4, 6, 7)
yz x
00
01
11 1
10
0 1
F = yz + xz
3-VARIABLE MAP
The number of adjacent squares that may be combined must always represent a number that is a power of two such as 1, 2, 4, and 8. as a larger number of adjacent squares are combined, we obtain a product term with fewer literals.
One square represents one minterm, giving a term of 3 literals Two adjacent squares represent a term of two literals Four adjacent squares represent a term of one literal Eight adjacent squares encompass the entire map and produce a function that always equal to 1
3-VARIABLE MAP
Simplify the Boolean function F(x, y, z) = (0, 2, 4, 5, 6)
yz x
00 1 1
01
11
10 1
F = z + xy
3-VARIABLE MAP
Try this! Given the Boolean function: F = AC + AB + ABC + BC
(a) Express the function in sum of minterms (b) Find the minimal sum of products expression
4-VARIABLE MAP
16 minterms for four binary variables Map consists of 16 squares
wx yz 00 m0 m4 m12 01 m1 m5 m13 11 m2 m6 m15 10 m3 m7 m14
00
01 11 10
m8
m9
m11
m10
4-VARIABLE MAP
One square represents one minterm, giving a term of four literals Two adjacent squares represents a term of three literals Four adjacent squares represents a term of two literals Eight adjacent squares represents a term of one literals Sixteen adjacent squares represents a function equal to 1
Example
Given the Boolean function;
2.
3. 4.
Addend
X 0
Carry
Y 0 C 0
C = xy
S 0
0
1 1
1
0 1
0
0 1
1
1 0
Y
0 0 1
Z
0 1 0
C
0 0 0
S
0 1 1
0 1
1 1 1
1 0
0 1 1
1 0
1 0 1
1 0
1 1 1
0 1
0 0 1
Carry: C = xy + xz + yz
When m =< 2 Encoder - a digital function that produces a reverse operation from that of a decoder. - a combinational logic circuit that accepts one or more inputs and generates a unique multibit binary output. The encoder generates a number or code in response to an input
Definition of Terms
Race Condition - an undesirable condition which may exist in a system when 2 or more inputs change simultaneously Register - a group of memory elements that work together as a unit - primary purpose is to store a word Buffer Register - a register that temporarily stores a word during data processing Shift Register - a register that can shift the stored bits one position to the left or right (shift left, shift right) Controlled Shift Register - has control inputs determine what it does on the next clock pulse Serial Loading - means storing a word in the shift register by entering 1 bit per clock pulse Parallel Loading (Broadside Loading) - loading all bits of a word in parallel during one clock pulse
Definition of Terms
Counter - a register capable of counting the member of clock pulses that have arrived at its clock input - electronic equivalent of a binary odometer Controlled Counter - counts clock pulses only when commanded to do so Synchronous Counters - a counter in which the clock drives each F/F to eliminate the ripple delay Ring Counter - a counter producing words with 1 high bit which shifts one position per clock pulse Other Counters Modulus of a Counter - the number of stable states a counter has Mod 10 Counter - divide by 10 circuit - decade counter Down Counter - counts down Up Down Counter - F/F outputs are connected to steering networks Presettable Counter - the counter starts at a number greater than 0
Definition of Terms
3 State Registers 3 State switch - a non inverting buffer that can be closed or opened by a control signal - a tri state switch Bus - a group of wires used as a common word path by several registers Memory - where the programs and data are stored before calculations begin Address - a way of specifying the location of data in memory, similar to a house address Access Time - the time it takes to read the contents of a memory location after it has been addressed Volatile - a type of memory in which data stored in the memory is lost when the power is turned off Non-Volatile - a type of memory in which the stored data is not lost when the power is turned off
SEQUENTIAL CIRCUITS
Introduction
Combinational logic
Memory elements
External inputs
Introduction
Bistable logic devices: latches and flip-flops. Latches and flip-flops differ in the method used
for changing their state.
Memory Elements
Characteristic table:
Command (at time t) Set Reset Memorise / No Change Q(t) X X 0 1 Q(t+1) 1 0 0 1
clock
Positive edges
Negative edges
Pulse-triggered
latches ON = 1, OFF = 0
Edge-triggered
flip-flops positive edge-triggered (ON = from 0 to 1; OFF = other
Latch
S-R Latch
For active-LOW input S'-R' latch (also known as NAND
gate latch), R'=LOW (and S'=HIGH) a RESET state S'=LOW (and R'=HIGH) a SET state both inputs HIGH a no change both inputs LOW a Q and Q' both HIGH (invalid)!
S-R Latch
S 0 1 0 1 R 0 0 1 1
Q
Q'
S-R Latch
10 100 R
10 001 S
S'
Q Q'
R'
S' R' 1 0 1 1 0 1 1 1 0 0
Flip-flops
triggering input called the clock. Change state either at the positive edge (rising edge) or at the negative edge (falling edge) of the clock signal.
Clock signal
Positive edges Negative edges
Flip-flops
FOUR FLIP-FLOP FUNCTIONS 1. Reset 2. Set 3. Toggle 4. No Change FOUR TYPES OF FLIP-FLOPS 1. S-R (Set-Rest) 2. D (Data or gated D-latch) 3. J-K 4. T (Toggle)
S-R Flip-flop
by providing an additional control input that determines when the state of the circuit is to be changed. Usually, this additional control is in the form of a clock pulse (CP) Characteristic table of positive edge-triggered S-R flip-flop:
S 0 0 1 1 R 0 1 0 1 CLK X Q(t+1) Q(t) 0 1 ? Comments No change Reset Set Invalid
S-R Flip-flop
D Flip-flop
CLK
C
R
Schematic Symbol
Example
Given the waveforms for the D input and the clock, determine the Q output waveform in the flip-flop starts out RESET. Assume that the positive edgetriggered flip-flop is given.
J-K Flip-flop
A J-K flip-flop is a refinement of the S-R flip-flop in that the indeterminate state of the S-R flip-flop is defined in the J-K flipflop. Inputs J and K behave like S and R, to set and reset the flip-flop, respectively. J S (set) and K R (reset) No invalid state. Include a toggle state.
J=HIGH (and K=LOW) a SET state K=HIGH (and J=LOW) a RESET state both inputs LOW a no change both inputs HIGH a toggle
Example
The waveforms are applied to the J, K and clock inputs as indicated. Determine the Q output, assuming that the negative edge-triggered flip-flop is initially RESET.
J-K Flip-Flop
T Flip-flop
Asynchronous Inputs
Asynchronous Inputs
inputs.
J
PRE J
Q
CLK
C
K Q'
K CLR
J = K = HIGH
Preset
Toggle
Clear