Chapter 9
Introduction
Binary Quantities and Variables
Logic Gates
Boolean Algebra
Combinational Logic
Number Systems and Binary Arithmetic
Numeric and Alphabetic Codes
OHT 9.1
Introduction
9.1
OHT 9.2
9.2
OPEN
OFF
CLOSED
ON
A truth table
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.3
L = S1 AND S2
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.4
L = S1 OR S2
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.5
L = S1 AND S2 AND S3
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.6
L = S1 OR S2 OR S3
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.7
A series/parallel arrangement
OHT 9.8
OHT 9.9
Logic Gates
9.3
OHT 9.10
OHT 9.11
The OR gate
OHT 9.12
OHT 9.13
OHT 9.14
OHT 9.15
OHT 9.16
OHT 9.17
OHT 9.18
Boolean Algebra
9.4
Boolean Constants
these are 0 (false) and 1 (true)
Boolean Variables
variables that can only take the vales 0 or 1
Boolean Functions
each of the logic functions (such as AND, OR and
NOT) are represented by symbols as described above
Boolean Theorems
a set of identities and laws see text for details
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.19
Boolean identities
AND Function
OR Function
NOT function
00=0
0+0=0
0 1
01=0
0+1=1
1 0
10=0
1+0=1
AA
11=1
1+1=1
A0=0
A+0=A
0A=0
0+A=A
A1=A
A+1=1
1A=A
1+A=1
AA=A
A A 0
A+A=A
A A 1
OHT 9.20
Boolean laws
Commutative law
Absorption law
AB BA
AB B A
A AB A
A( A B ) A
Distributive law
De Morgans law
A(B C ) AB BC
A BC ( A B )( A C )
A B AB
Associative law
Note also
A(BC ) ( AB )C
A (B C ) ( A B ) C
A AB A B
AB A B
A( A B ) AB
OHT 9.21
Combinational Logic
9.5
sequential logic
where the outputs are determined not only by the current
inputs but also by the sequence of inputs that led to the
current state
OHT 9.22
OHT 9.23
OHT 9.24
OHT 9.25
Example (continued)
work progressively from the inputs to the output adding
logic expressions to the output of each gate in turn
OHT 9.26
OHT 9.27
Example (continued)
The logic function
X ( A B) ( AB)
OHT 9.28
1 0
1 0
1 1
1 1
X A BC ABC A BC
OHT 9.29
Example (continued)
X A BC A BC AB C
The logic function
can then be implemented as before
OHT 9.30
OHT 9.31
9.6
Binary
11012 = (1 23) + (1 22) + (0 21) + (1 20)
Octal
1238 = (1 83) + (2 82) + (3 81)
Hexadecimal
12316 = (1 163) + (2 162) + (3 161)
here we need 16 characters 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.32
Number conversion
conversion to decimal
add up decimal equivalent of individual digits
OHT 9.33
Number conversion
conversion from decimal
repeatedly divide by the base and remember the remainder
Number Remainder
26
13
0
6
1
3
0
1
1
0
1
read number from this end
=11010
OHT 9.34
Binary arithmetic
much simpler than decimal arithmetic
can be performed by simple circuits, e.g. half adder
OHT 9.35
OHT 9.36
9.7
Decimal
Binary
0
1
2
3
4
5
6
7
8
9
10
11
12
etc.
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
etc.
OHT 9.37
9.7
Decimal
Binary
0
1
2
3
4
5
6
7
8
9
10
11
12
etc.
0
1
10
11
100
101
110
111
1000
1001
10000
10001
10010
etc.
OHT 9.38
9.7
ASCII code
American Standard Code for Information Interchange
an alphanumeric code
each character represented by a 7-bit code
gives 128 possible characters
codes defined for upper and lower-case alphabetic characters,
digits 0 9, punctuation marks and various non-printing
control characters (such as carriage-return and backspace)
OHT 9.39
9.7
OHT 9.40
Key Points
It is common to represent the two states of a binary
variable by 0 and 1
Logic circuits are usually implemented using logic gates
Circuits in which the output is determined solely by the
current inputs are termed combinational logic circuits
Logic functions can be described by truth tables or using
Boolean algebraic notation
Binary digits may be combined to form digital words
Digital words can be processed using binary arithmetic
Several codes can be used to represent different forms of
information
Storey: Electrical & Electronic Systems Pearson Education Limited 2004
OHT 9.41