BBEE203 Module 4 Boolean Algebra and Logic Circuits
BBEE203 Module 4 Boolean Algebra and Logic Circuits
Introduction
Digital electronics deals with the electronic manipulation of numbers, or with the
manipulation of varying quantities by means of numbers because it is convenient to do so.
Today's digital systems deal only with the numbers 'zero' and 'one', because they can be
represented easily by 'off and 'on' within a circuit. Also all of us are aware that the computer
understands only zeros and ones. Hence this unit deals with the following topics:
Data Representation:
Binary numbers, particularly large series of ones and zeroes are not very convenient.
Hexadecimal (base 16) is easier for mere humans to comprehend and offers the advantage
over denary (base 10). A single hexadecimal character (in the range zero to F) is used to
represent a group of four binary digits (bits). This group of four bits (or single hex character)
is sometimes called a nibble.
A byte of data comprises a group of eight bits, thus a byte can be represented by just two
hexadecimal (hex) characters.
A group of 16 bits (a word) can be represented by four hex characters, 32 bits (a double word
by eight hex characters).
$ symbol before a hexadecimal number or add an H to the end of the number. Ex: 64 means
decimal ‘sixty-four’; whereas $64 means hexadecimal ‘six-four’, which is equivalent to
decimal 100. Similarly, 7FH means hexadecimal ‘seven-F’, which is equivalent to decimal
127
Number Systems - are used to describe the quantity of something or certain information. It is
the way in which the numbers are represented, Code using symbols that refer to a number of
items.
Decimal Number System - Uses ten symbols, 0 to 9 (base 10 system)
Binary Number System - Uses two symbols, 0 and 1 (base 2 system)
Hexadecimal Number System - Uses fifteen symbols, 0 to 15=F (base 16 system)
Octal Number System - Uses seven symbols, 0 to 7 (base 8 system)
Decimal to Binary Conversion: Successively divide by two and take the remainder as shown.
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
(25)10 = (……) 2
Convert the following decimal number to binary using the above process.
1) (67)10 = ( )2 2) (95)10 = ( )2 3) (95)10 = ( )2 4) (867)10 = ( )2
(125.35)10= ( )2
Binary to Decimal
The decimal number is equal to the sum of binary digits (dn) times their power of 2 (2n):
decimal = d0×20 + d1×21 + d2×22 + ...
binary
1 0 0 0 1 1
number:
power of 2: 25 24 23 22 21 20
Binary Fraction to Decimal: The decimal number is equal to the sum of binary digits (dn)
times their negative power of 2 (2-n):
(0.11011)2 = ( 0.84375) 10
(11001110.001101)2 = ( 206.203125) 10
Binary to hexadecimal:
Note: Before decimal point, group four bits from right to left. After decimal point, group four
bits from left to right.
Binary to octal:
Note: Before decimal point, group three bits from right to left. After decimal point, group
three bits from left to right.
Binary to Octal
(100 111 111 110 010 011 ) 2 = ( 477623)8
001 101 111 000 110 = = ( 15706)8
(001 001 111 111 010.010 011 ) 2 = (11772.23 )8
(000 010 011 111 111 100 010.010 011 100 110 ) 2 = ( 0237742.2346)8
1011
1s compl = 0100
2’s compl = 0100+1=0101
A byte of data can be stored at each address within the total memory space of a
microprocessor system (16-bit address bus MP or MC)
Individual bits within a byte are numbered from 0 (least significant bit) to 7 (most significant
bit). In the case of 16-bit words, the bits are numbered from 0 (least significant bit) to 15
(most significant bit).
Negative (or signed) numbers can be represented using two’s complement notation where the
leading (most significant) bit indicates the sign of the number (1 = negative, 0 = positive). For
example, the signed 8-bit number 10000001 represents the denary(decimal) number -1.
The range of integer data values that can be represented as bytes, words and long words are
shown in table
Boolean algebra is a mathematical system for the manipulation of variables that can have one
of two values.
• In formal logic, these values are “true” and “false.”
• In digital systems, these values are “on” and “off,” 1 and 0, or “high” and “low.”
Boolean expressions are created by performing operations on Boolean variables.
• Common Boolean operators include AND, OR, and NOT.
• A Boolean function has:
• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
• It produces an output that is also a member of the set {0,1}.
• 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 functions to their simplest form.
• There are a number of Boolean identities that help us to do this.
Basic Definitions
• Closure:
• A set S is closed with respect to a binary operator if, for every pair of elements of S, the
binary operator specifies a rule for obtaining a unique element of S. For example, the set
of natural numbers N = {1, 2, 3, 4, ... } is closed with respect to the binary operator plus (
+) by the rules of arithmetic addition, since for any a, b E N we obtain a unique c E N by
the operation a + b = c.
• Associative law:
• A binary operator* on a set S is said to be associative whenever (x * y)* z = x * (y
* z) for all x, y, z, Ɛ S
• Commutative law: A binary operator* on a set S is said to be commutative whenever (x *
y) = (y * x) for all x, y Ɛ S
• Identity element. A set S is said to have an identity element with respect to a binary
operation * on S if there exists an element e Ɛ S with the property e*x = x*e = x for any x
belongs to S
• Ex: x+0 = 0+x = x
• Inverse:
• A set S having the identity element e with respect to a binary operator * is said to have
an inverse whenever, for every x Ɛ S, there exists an element y Ɛ S such that X * y = e
• Example: In the set of integers I with e = 0, the inverse of an element a is (-a) since a + (-
a) = 0,
• Distributive law:
• If * and · are two binary operators on a set S, * is said to be distributive over (·)
whenever x * (y · z) = (x * y)· (x * z). The only distributive law applicable is that of ·
over + : a· (b + c) = (a· b) + (a· c)
• The additive inverse defines subtraction.
• The binary operator· defines multiplication. The multiplicative identity is 1. The
multiplicative inverse of a = 1/ a defines division, i.e., a· 1/a = 1.
Axiomatic Definitions
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
• Boolean algebra is an algebraic structure defined on a set of elements B together with two
binary operators + and· provided the following (Huntington) postulates are satisfied:
1.
• (a) Closure with respect to the operator +.
• (b) Closure with respect to the operator ·.
2.
• (a) An identity element with respect to +, designated by 0: x + 0 =0 + X = X.
• (b) An identity element with respect to ·, designated by I: x · I = 1 · x = x.
3.
• (a) Commutative with respect to + : x + y = y + x.
• (b) Commutative with respect to · : x · y = y · x.
4.
• (a) · is distributive over +: x · (y + z) = (x · y) + (x · z).
• (b) + is distributive over·: x + (y · z) = (x + y) · (x + z).
5.
• For every element x E B, there exists an element x' E B (called the complement of
x) such that (a) x + x' = l and (b) x · x' = 0.
6.
• There exists at least two elements x, y E B such that x =# y.
• Huntington postulates do not include the associative law. However, this law holds for
Boolean algebra and can be derived (for both operators) from the other postulates.
• The distributive law of +over·, i.e., x+(y · z) = (x + y) · (x + z), is valid for Boolean
algebra, but not for ordinary algebra.
• Boolean algebra does not have additive or multiplicative inverses; therefore, there are no
subtraction or division operations.
• Complement is not available in ordinary algebra.
• Ordinary algebra deals with the real numbers, which constitute an infinite set of elements.
Boolean algebra deals the two-valued elements, 0 and l
Inverter
Inverters are used to complement the logical state (i.e. a logic 1 input results in a logic 0
output and vice versa). Inverters also provide extra current drive and, like buffers, are used in
interfacing applications where they provide a means of regularizing logic levels present at the
input or output of a digital system.
The Boolean expression for the output, Y, of a buffer with an input, X, is: Y = X bar
AND Gate
OR Gate
NAND Gate
NAND (i.e. NOT-AND) gates will only produce a logic 0 output when all inputs are
simultaneously at logic 1. Any other input combination will produce a logic 1 output. A
NAND gate is AND gate inverted. The circle shown at the output denotes this inversion.
The Boolean expression for the output, Y, of a NAND gate with inputs A and B is:
Y = bar(A · B)
NOR Gate
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
NOR (i.e. NOT-OR) gates will only produce a logic 1 output when all inputs are
simultaneously at logic 0. Any other input combination will produce a logic 0 output. A NOR
gate is inverted OR.
The Boolean expression for the output, Y, of a NOR gate with inputs, A and B, is:
Y = (A+B) bar
Exclusive-OR Gate
Exclusive-OR gates will produce a logic 1 output whenever either one of the inputs is at logic
1 and the other is at logic 0. Exclusive-OR gates produce a logic 0 output whenever both
inputs have the same logical state (i.e. when both are at logic 0 or both are at logic 1).
The Boolean expression for the output, Y, of an exclusive-OR gate with inputs A and B is:
Y = A’ · B + A · B’
Combinational Logic
By using a standard range of logic levels (i.e. voltage levels used to represent the logic 1 and
logic 0 states) logic circuits can be combined in order to solve complex logic functions. A
circuit in which the output depends only on the current inputs. They are memory-less.
Half Adder: is used to add two bits. It outputs a sum and a carry.
Truth table: Half Adder
Carry= XY
Sum= X’Y+XY’
Carry = A’BC+AB’C+ABC’+ABC
The above circuits can add only single bits of information. In order to add multiple bits
eg:1001+1011, we need to use an N bit adder.