0% found this document useful (0 votes)
620 views19 pages

BBEE203 Module 4 Boolean Algebra and Logic Circuits

This document provides an introduction to digital electronics and data representation. It discusses various number systems including binary, decimal, hexadecimal and octal. It describes how to convert between these number systems and discusses data types and Boolean algebra. Key topics covered include binary arithmetic, complement of binary numbers, and representing negative numbers using two's complement notation.

Uploaded by

shilpa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
620 views19 pages

BBEE203 Module 4 Boolean Algebra and Logic Circuits

This document provides an introduction to digital electronics and data representation. It discusses various number systems including binary, decimal, hexadecimal and octal. It describes how to convert between these number systems and discusses data types and Boolean algebra. Key topics covered include binary arithmetic, complement of binary numbers, and representing negative numbers using two's complement notation.

Uploaded by

shilpa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Department of Electronics and Communication

Introduction to Electronics and Communication 22ESC143


VS Notes: Module 3

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

Fractional Decimal to Binary:


To get the binary equivalent of the fractional part of decimal, we have to multiply the
fractional part by 2 and take the integer part before the decimal point as result and multiply
the remaining fractional part by 2 again.
We perform this process till the fractional part becomes 0. In some cases the fractional part
will not become 0 so, for those scenarios we will stop after N digits, where N will be
sufficiently large or given in the question.
Ex:
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
(0.65)10 = (.10100)2

(125.35)10= ( )2

Convert the following decimal number to binary:


1) (637.25)10 = ( )2
2) (6062.995)10 = ( )2
3) (3522.655)10 = ( )2
4) (86.67)10 = ( )2

Decimal to Hexadecimal: Divide successively by 16 and take the remainder as shown

Or convert to binary and then to decimal

Decimal Hexadecimal Binary


1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
16 10 10000
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

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 + ...

1) Find the decimal value of 1110012:


binary
1 1 1 0 0 1
number:
power of 2: 25 24 23 22 21 20
1110012 = 1⋅25+1⋅24+1⋅23+0⋅22+0⋅21+1⋅20 = 5710

2) Find the decimal value of 1000112

binary
1 0 0 0 1 1
number:
power of 2: 25 24 23 22 21 20

1000112 = 1⋅25+0⋅24+0⋅23+0⋅22+1⋅21+1⋅20 = 3510

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

Convert the following binary to decimal:


1) (1011010111.001)2 = ( ) 10
2) (11100111.110)2 = ( ) 10
3) (101101111.11110)2 = ( ) 10
4) (1010111.1110)2 = ( ) 10
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

Binary to hexadecimal:
Note: Before decimal point, group four bits from right to left. After decimal point, group four
bits from left to right.

0011 0010 1101 =32D


0 1101 0101 1100 0111 = 0D5C7
0111 1111 1100 0000 0001 1010 1010 = 7FC01AA

Solve the following:


1) (100111001.1100)2 = ( ) 16
2) (0011110101010.0011)2 = ( ) 16
3) (1000100111.1110)2 = ( ) 16
4) (101000111.110011)2 = ( ) 16

Hexadecimal to Binary: Represent each digit by four bits

A23 = 1010 0010 0011


C35= 1100 0011 0101
DA89= 1101 1010 1000 1001
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
F03E= 1111 0000 0011 1110
CEF4= 1100 1110 1111 0100

Solve the following:


5) (D18A)16 = ( )2
6) (1CCA.A)16 = ( )2
7) (BA12)16 = ( )2
8) (87A1.90)16 = ( )2

Binary to octal:
Note: Before decimal point, group three bits from right to left. After decimal point, group
three bits from left to right.

Solve the following:


9) (10100011.110)2 = ( )8
10) (10101111.1110)2 = ( )8
11) (1011010011.110)2 = ( )8
12) (10100011.111110)2 = ( )8
Octal to Binary: Represent each digit by 3 bits

(43)8 = ( 100 011 ) 2


Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
(743)8 = (111 100 011 ) 2
(6543)8 = ( 110 101 100 011 ) 2
(76532)8 = ( 111 110 101 011 010 ) 2
(477.23)8 = (100 111 111.010 011 ) 2

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

Solve the following:


13) (765.222)8 = ( )2
14) (2345.772)8 = ( )2
15) (76335.234)8 = ( )2
16) (6345.542)8 = ( )2

Complement of Binary numbers:


In real life we deal with negative numbers also. The concept of complement is useful in
representing the negative numbers. Also in manipulation of numbers and digital circuits, this
concept is used.
1) 1’s Complement: Change 0 to 1 and 1 to 0. Ex: 1’s complement of 110010 is 001101
2) 2’s Complement: 1’s Complement plus 1. Ex: 2’s complement of 110010 is 001110

101 = 1’s compl (101) = 010


2’s copml(101) = 1’s compl + 1 =010+1 =011

1011
1s compl = 0100
2’s compl = 0100+1=0101

Data Types (for info)


Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

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

Binary, denary, hexadecimal

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.

Duality The Huntington postulates:


The dual of an expression is obtained by changing the operators and identity elements. This important
property of Boolean algebra is called the duality principle. It states that every algebraic expression
deducible from the postulates of Boolean algebra remains valid if the operators and identity elements
are interchanged.
If the dual of an algebraic expression is desired, we simply interchange OR and AND operators and
replace 1's by O's and O's by 1's.
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

Boolean Algebra Vs Arithmetic and Ordinary Algebra


Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

• 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

Digital Logic Gates


Signal: Time varying quantity which conveys some information
Analog Signal: The signals are continuous in time and also amplitude
Digital Signal: The signals are discrete in time and also amplitude. The signals are coded
using different coding techniques
Logic Gates
Logic gates: circuits designed to produce the basic logic functions, AND, OR, etc. These
circuits are basic building blocks of more complex, logic circuit arrangements.
Symbol standards:
A) British Standard (BS)
B) American Standard (MIL(Military Std/ ANSI(American National Std Institute) symbol.
In Boolean expressions ‘ + ’ denote OR, ‘·’ to denote AND, and ‘-’ to denote NOT.
Inverters and buffers each have only one input, exclusive-OR gates have two inputs and the
other basic gates (AND, OR, NAND and NOR) are commonly available with up to eight
inputs.
Buffer
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3
Buffers do not affect the logical state of a digital signal (i.e. a logic 1 input results in a logic 1
output whereas a logic 0 input results in a logic 0 output). Buffers are normally used to
provide extra current drive at the output but can also be used to regularize the logic levels
present at an interface. The Boolean expression for the output, Y, of a buffer with an input, X,
is: Y = X

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

Fig: Symbol and Truth table of AND gate

Fig: Representation of AND gate


AND gates will only produce a logic 1 output when all inputs are simultaneously at logic 1.
Any other input combination results in a logic 0 output. The logic is similar to the switches in
series as shown in figure.
The Boolean expression for the output, Y, of an AND gate with inputs, A and B, is:
Y = (A·B)bar
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

OR Gate

Fig: Symbol and Truth table of OR gate

Fig: Representation of OR gate


OR gates will produce a logic 1 output whenever anyone, or more, inputs are at logic 1. An
OR gate will only produce a logic 0 output whenever all of its inputs are simultaneously at
logic 0. The logic is similar to the switches in parallel as shown in figure.
The Boolean expression for the output, Y, of an OR gate with inputs A and B is:
Y=A+B

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.

Adders: used to add binary numbers.


Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

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’

Fig: Half Adder


We can then use a half-adder to compute the sum of two binary digits only. Hence to add
more than two bits, we need a full adder.
In a half Adder
Full Adder using two half Adders
Truth table: Full Adder
A B C SUM Carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

Carry = A’BC+AB’C+ABC’+ABC

Fig: Full Adder using two half Adders


This is simplified equation for carry

Truth table comparing half and full adder


x y c s c S
1 C a u
1 r m
r
y
1 1 1 0 1 1 1
1 1 0 0 1 1 0
1 0 1 1 0 1 0
1 0 0 1 0 0 1
0 1 1 1 0 1 0
0 1 0 1 0 0 1
0 0 1 0 0 0 1
0 0 0 0 0 0 0
Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

Fig: Full Adder using two half Adders

Full adder using basic gates: AND-OR


Department of Electronics and Communication
Introduction to Electronics and Communication 22ESC143
VS Notes: Module 3

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.

Ripple Carry Adder (For information only)


N-bit adder is designed by connecting the carry out and carry in lines of n full adders. This is
called a Ripple Carry adder
Ex: 4-bit Ripple carry adder

Study (what is done in the class)


Boolean Algebra – Problems
SOP and POS related problems

You might also like