2. Outline
Part 1 – Logical Operators
Part 2 – Binary Number System
Part 3 – Boolean Algebra
3. Relational Operators
Name of Operator Symbol
Less than <
Greater than >
Less than or Equal to <+
Greater than or Equal to >=
Equal to =
Not Equal to <>
10. BINARY SYSTEM
Barrier of language between man and machine is overcome by the
bi-stable nature of all electrical devices.
A light bulb is either “on” or “off”
A switch is either “open” or “closed”
A magnet has a field in one direction or the opposite
For computer language, we can think of “ON” condition as being
equal to 1, and the “OFF” condition as 0
This system of 0 and 1 (with radix 2) is termed as “BINARY” system.
The positional values increase in terms of powers of 2
11. Place Value of DECIMAL Numbers
7852 = 7 x 103 + 8 x 102 + 5 x 101 + 2 x 100
0.6504 = 6 x 10-1 + 5 x 10-2 + 0 x 10-3 + 4 x 10-4
12. BINARY to DECIMAL Conversion
Any combination of 0’s and 1’s is a valid Binary
Number and can be converted into decimal by
expanding it in powers of 2
(110101)2 = 1 x 25 + 1 x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 20
= (53)10
(0.1101)2 = 1 x 2-1 + 1 x 2-2 + 0 x 2-3 + 1 x 2-4
= 0.5 + 0.25 + 0 + 0.0625
= (0.8125)10
14. DECIMAL to BINARY Conversion
An integer decimal number can be converted to Binary
by dividing it successively by 2. A fraction can be
converted to Binary by multiplying it successively by 2.
2 : 13 remainder
2 : 6 1
2 : 3 0
2 : 1 1
2 : 0 1
.125
x 2
0.250
x 2
0.500
x 2
1.000
Thus (13.125)10 = (1101.001)2
15. Dear, who Invented
Boolean Algebra?
Yes, I would also
like to know!
George Boole,
(born 1815, died 1864), English
mathematician who helped establish modern
symbolic logic and whose algebra of logic,
now is called Boolean algebra.
17. Variables A, B, C etc., giving
us a logical expression of
A + B = C, but each variable can
ONLY be a 0 or a 1
The variables used in Boolean
Algebra only have one of two possible
values, a logic “0” and a logic “1”
Examples of
these
individual laws
of Boolean,
rules and
theorems for
Boolean
Algebra are
given in the
next slides
22. BOOLEAN Algebra – Example2
Construct a Truth Table for the logical functions at points C, D and Q
in the following circuit and identify a single logic gate that can be
used to replace the whole circuit.
23. BOOLEAN Algebra – Example2
First observations tell us that the
circuit consists of a 2-input NAND
gate, a 2-input EX-OR gate and
finally a 2-input EX-NOR gate at the
output. As there are only 2 inputs
to the circuit labelled A and B,
there can only be 4 possible
combinations of the input and
these are: 0-0, 0-1, 1-0 and
finally 1-1.
Plotting the logical functions from
each gate in tabular form will give
us the truth table for the whole of
the logic circuit
24. BOOLEAN Algebra – Example2
From the truth table above, column C
represents the output function generated by
the NAND gate, while column D represents
the output function from the Ex-OR gate.
Both of these two output expressions then
become the input condition for the Ex-
NOR gate at the output.
It can be seen from the truth table that an
output at Q is present when any of the two
inputs A or B are at logic 1. The only truth
table that satisfies this condition is that of
an OR Gate. Therefore, the whole of the
above circuit can be replaced by just one
single 2-input OR Gate.
25. Applications of BOOLEAN Algebra
Boolean algebra can be applied to any system in which each
variable has two states. Few examples are :
EXAMPLE 1
Coffee, Tea, or Milk? An
Automated Cafeteria orders a
machine to dispense coffee, tea,
and milk. Design the machine so
that it has a button (input line) for
each choice and so that a
customer can have at most one of
the three choices. Diagram the
circuit to insure that the “at most
one” condition is met.
26. Applications of BOOLEAN Algebra
EXAMPLE 2
U.S. Rocket Launcher The nation of
Upper Slobovia has gained a missile
defense capability governed by its
Security Council. The Council consists of
four members: the U.S. (Upper
Slobovian) President and three
Counselors (the Chiefs of Staff of the
Army and Air Force plus the President’s
Uncle Homer). The missile system is to
be activated by a device obeying these
rules: each member of the Security
Council has a button to push; the
missiles fire only if the President and at
least one Counselor push their buttons.
Design the rocket firing circuitry
27. Applications of BOOLEAN Algebra
EXAMPLE 3
Most calculators, digital clocks, and watches use the
“seven segment display” format. In this setup, as
the diagram at the right shows, there are seven
segments that can be lit in different combinations to
form the numerals 0 through 9. For example, “1” is
formed by lighting segments b and c; “2” consists of
segments a, b, g, e, and d. “4” is composed of
segments b, c, f, and g.
Design circuitry to run a seven-segment display for
one digit. The input consists of a four-bit digit
(where each bit is an input line). The outputs are a,
b, c, d, e, f, and g of the seven segment diagram (1 =
light the segment, 0 = do not light the segment).
From a truth table, write and simplify seven Boolean
expressions. Then draw the minimal circuit.