Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Number system logic gates
1. UNIT I
Number System
By Dr. Dhobale J V
Associate Professor
School of Engineering & Technology
RNB Global University, Bikaner
RNB Global University, Bikaner. 1Course Code - 19004000
2. Objectives
Number Systems – Decimal, Binary, Octal,
Hexadecimal.
1’s and 2’s Complements.
Binary Arithmetic.
Interconversions.
Binary Coded Decimal (BCD), Gray code,
Excess Code, ASCII Code.
Error detection and Correction. 2RNB Global University, Bikaner.Course Code - 19004000
3. Number System
Decimal Number System : The decimal
numeral system has ten as its base. It is
the most widely used numerical base.
When we write decimal (base 10)
numbers, we use a positional notation
system.
Ex. 845= 8*102
+4*101
+5*100
= 8*100+4*10+5*1
= 800+40+5
RNB Global University, Bikaner. 3Course Code - 19004000
4. Number System
For whole numbers, the rightmost digit
position is the one’s position (100
= 1).
The numeral in that position indicates
how many ones are present in the
number.
The next position to the left is ten’s, then
hundred’s, thousand’s, and so on. Each
digit position has a weight that is ten
times the weight of the position to its
right.
RNB Global University, Bikaner. 4Course Code - 19004000
5. Number System
The decimal numerals are the familiar
zero through nine (0, 1, 2, 3, 4, 5, 6, 7, 8,
9).
Ex. 12710 - Radix or base is 10.
RNB Global University, Bikaner. 5Course Code - 19004000
6. Number System
The binary number system is also a
positional notation numbering system.
Base of binary number system is two.
Each digit position in a binary number
represents a power of two.
Ex.
101101=1*25
+0*24
+1*23
+1*22
+0*21
+1*20
= 32+0+8+4+0+1
= 32+8+4+1
RNB Global University, Bikaner. 6Course Code - 19004000
7. Number System
Only the numerals 0 and 1 are used in
binary numbers.
When talking about binary numbers, it is
often necessary to talk of the number of
bits used to store or represent the
number.
This merely describes the number of
binary digits that would be required to
write the number. The number in the
above example is a 6 bit number.
RNB Global University, Bikaner. 7Course Code - 19004000
8. Number System
Ex. 1011012 112 101102
Conversion between decimal and binary:
(10110)2 = (?)10
=1*24+0*23+1*22+1*21+0*20
= 16+0+4+2+0
=16+4+2
=22
RNB Global University, Bikaner. 8Course Code - 19004000
9. Number System
Conversion between binary and decimal:
(22)10 = (?)2
22 / 2 = 11 remainder 0 (LSB)
11 / 2 = 5 remainder 1
5 / 2 = 2 remainder 1
2 / 2 = 1 remainder 0
(MSB)
Ans. 10110; (22)10 = (10110)2
RNB Global University, Bikaner. 9Course Code - 19004000
10. Number System
Hexadecimal Numbers:
Base is 16.
This number system is called
hexadecimal, and each digit position
represents a power of 16.
For any number base greater than ten, a
problem occurs because there are more
than ten symbols needed to represent
the numerals for that number base.
RNB Global University, Bikaner. 10Course Code - 19004000
11. Number System
Hexadecimal Numbers: Since the
hexadecimal system is base 16, there
are sixteen numerals
required. The following are the
hexadecimal numerals:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Ex. 3FA16, 4716
RNB Global University, Bikaner. 11Course Code - 19004000
12. Number System
Hexadecimal to Decimal Conversion:
25H = (2*161) + (2*160)
Decimal to Hexadecimal to
Conversion:
3710 = (?)16
37/16 = 2 R 5
= (25)16
RNB Global University, Bikaner. 12Course Code - 19004000
13. Number System - Interconversions
Binary to Hexadecimal Conversation:
1010000100111101
A 1 3 D
Hexadecimal to Binary
A 1 3 D
1010 0001 0011 1101
RNB Global University, Bikaner. 13Course Code - 19004000
14. Number System - Interconversions
Octal Number System:
RNB Global University, Bikaner. 14Course Code - 19004000
15. Number System - Interconversions
Octal to Decimal Conversion:
37o = (3*81) + (7*80)
= 24 + 7
= 31
Decimal to Octal Conversion:
3110 = (?)o
31 / 8 = 3 R 7
37
RNB Global University, Bikaner. 15Course Code - 19004000
16. Number System- Interconversions
Binary to Octal Conversion:
001010000100111101
1 2 0 4 7 5
Octal to Binary:
1 2 0 4 7 5
001 010 000 100 111 101
RNB Global University, Bikaner. 16Course Code - 19004000
17. RNB Global University, Bikaner. 17Course Code - 19004000
Number System - Interconversions
18. RNB Global University, Bikaner. 18Course Code - 19004000
Convert 0.625 to binary equivalent.
Step1- 0.625 * 2 = 1.25 - The first
binary digit to the right of the point is 1.
Step 2- 0.25 * 2 = 0.50 - The second
binary digit to the right of the point is 0.
Step 3- 0.50 * 2 = 1.0 – The third binary
digit to the right of the point is 1.
(0.625)10 = (0.101)2
Number System - Interconversions
19. Concept of Computer word &
Memory units
Bit is an abbreviation of the term ‘binary
digit’ and is smallest unit of information.
It is either 0 or 1.
A byte is a string of eight bits, is the
basic unit of data operated upon as a
single unit in computer.
A computer word is a string of bits whose
size, called the ‘word length’ or ‘word
size’, is fixed for a specified computer
RNB Global University, Bikaner. 19Course Code - 19004000
20. RNB Global University, Bikaner. 20Course Code - 19004000
Concept of Computer word &
Memory units
21. 1’s Complements & 2’s Complement
Complements are used in the digital
computers in order to simplify the
subtraction operation and for the logical
manipulations.
Two types of Complements:
1. The radix complement is referred to as the
r's complement.
2. The diminished radix complement is
referred to as the r − 1's complement
RNB Global University, Bikaner. 21Course Code - 19004000
30. Truth Table
A truth table lists all possible combinations of
input binary variables and the corresponding
outputs of a logic system.
The logic system output can be found from the
logic expression, often referred to as the
Boolean expression.
When the number of input binary variables is
only one, then there are only two possible
inputs, i.e. ‘0’ and ‘1’.
30RNB Global University, Bikaner.Course Code - 19004000
31. Truth Table
If the number of inputs is two, there can be
four possible input combinations, i.e. 00, 01,
10 and 11.
This statement can be generalized to say that,
if a logic circuit has n binary inputs, its truth
table will have 2n possible input combinations.
31RNB Global University, Bikaner.Course Code - 19004000
34. Logic Gates
The logic gate is the most basic building block
of any digital system, including computers.
Each one of the basic logic gates is a piece of
hardware or an electronic circuit that can be
used to implement some basic logic
expression.
34RNB Global University, Bikaner.Course Code - 19004000
35. Logic Gates
While laws of Boolean algebra could be used
to do manipulation with binary variables and
simplify logic expressions, these are actually
implemented in a digital system with the help
of electronic circuits called logic gates.
The three basic logic gates are the OR gate,
the AND gate and the NOT gate.
35RNB Global University, Bikaner.Course Code - 19004000
36. Logic Gates – OR Gate
An OR gate performs an ORing operation on
two or more than two logic variables.
written as Y = A+B and reads as Y equals A
OR B and not as A plus B.
An OR gate is a logic circuit with two or more
inputs and one output.
36RNB Global University, Bikaner.Course Code - 19004000
37. Logic Gates – OR Gate
37RNB Global University, Bikaner.Course Code - 19004000
38. Logic Gates – OR Gate
38RNB Global University, Bikaner.Course Code - 19004000
39. Logic Gates – AND Gate
An AND gate is a logic circuit having two or
more inputs and one output.
The output of an AND gate is HIGH only when
all of its inputs are in the HIGH state.
The AND operation on two independent logic
variables A and B is written as Y = A.B and
reads as Y equals A AND B.
39RNB Global University, Bikaner.Course Code - 19004000
40. Logic Gates – AND Gate
40RNB Global University, Bikaner.Course Code - 19004000
41. Logic Gates – AND Gate
41RNB Global University, Bikaner.Course Code - 19004000
42. Logic Gates – NOT Gate
A NOT gate is a one-input, one-output logic
circuit whose output is always the complement
of the input.
That is, a LOW input produces a HIGH output,
and vice versa.
It is also known as a ‘complementing circuit’ or
an ‘inverting circuit’.
42RNB Global University, Bikaner.Course Code - 19004000
43. Logic Gates – NOT Gate
.
43RNB Global University, Bikaner.Course Code - 19004000
44. Logic Gates – NAND Gate
NAND stands for NOT AND.
An AND gate followed by a NOT circuit makes
it a NAND gate.
The output of a NAND gate is a logic ‘0’ when
all its inputs are a logic ‘1’.
Y = A.B
44RNB Global University, Bikaner.Course Code - 19004000
46. Logic Gates – NOR Gate
NOR stands for NOT OR.
An OR gate followed by a NOT circuit makes it
a NOR gate.
The output of a NOR gate is a logic ‘1’ when
all its inputs are logic ‘0’; For all other input
combinations, the output is a logic ‘0’.
Y = (A+B).
46RNB Global University, Bikaner.Course Code - 19004000
47. Logic Gates – NOR Gate
47RNB Global University, Bikaner.Course Code - 19004000
48. Logic Gates – EXCLUSIVE-OR Gate
The EXCLUSIVE-OR gate, commonly written
as EX-OR gate, is a two-input, one-output
gate.
As can be seen from the truth table, the output
of an EX-OR gate is a logic ‘1’ when the inputs
are unlike and a logic ‘0’ when the inputs are
like.
48RNB Global University, Bikaner.Course Code - 19004000
50. Logic Gates – Exclusive-NOR Gate
EXCLUSIVE-NOR (commonly written as EX-
NOR) means NOT of EX-OR, i.e. the logic
gate that we get by complementing the output
of an EX-OR gate.
The truth table of an EX-NOR gate is obtained
from the truth table of an EX-OR gate by
complementing the output entries. Logically,
Y = (A⊕B) = (A.B+A.B).
50RNB Global University, Bikaner.Course Code - 19004000
52. Logic Gates – Universal Gates
OR, AND & NOT gates are the three basic
logic gates as they together can be used to
construct the logic circuit for any given
Boolean expression.
NOR and NAND gates have the property that
they individually can be used to hardware
implement a logic circuit corresponding to any
given Boolean expression.
52RNB Global University, Bikaner.Course Code - 19004000
53. Logic Gates – Universal Gates
Combination of NAND gates or a combination
of NOR gates can be used to perform
functions of any of the basic logic gates.
53RNB Global University, Bikaner.Course Code - 19004000
56. De Morgan’s Theorems
De Morgan has suggested two theorems
which are extremely useful in Boolean
Algebra.
1. Theorem 1: A.B=A+B.
NAND = Bubbled OR
The left hand side (LHS) of this theorem
represents a NAND gate with inputs A and B,
whereas the right hand side (RHS) of the
theorem represents an OR gate with inverted
inputs. 56RNB Global University, Bikaner.Course Code - 13004900
58. De Morgan’s Theorems
2. Theorem 2:
A+B = A.B
NOR = Bubbled AND
The LHS of this theorem represents a NOR
gate with inputs A and B, whereas the RHS
represents an AND gate with inverted inputs.
58RNB Global University, Bikaner.Course Code - 13004900
60. Binary Codes
In the coding, when numbers, letters or
words are represented by a specific
group of symbols, it is said that the
number, letter or word is being encoded
The group of symbols is called as a
code.
The digital data is represented, stored
and transmitted as group of binary bits.
This group is also called as binary code.
RNB Global University, Bikaner. 60Course Code - 19004000
61. Binary Codes
Advantages of Binary Code
1. Binary codes are suitable for the
computer applications.
2. Binary codes are suitable for the digital
communications.
3. Binary codes make the analysis and
designing of digital circuits if we use the
binary codes.
4. Since only 0 & 1 are being used,
implementation becomes easy.RNB Global University, Bikaner. 61Course Code - 19004000
62. Binary Codes
Classification of binary codes
The codes are broadly categorized into
following four categories.
1. Weighted Codes & Non-Weighted
Codes
2. Binary Coded Decimal Code
3. Alphanumeric Codes
4. Error Detecting Codes & Error
Correcting Codes.
RNB Global University, Bikaner. 62Course Code - 19004000
63. Binary Codes
Weighted and Non Weighted code
Weighted binary codes are those binary
codes which obey the positional weight
principle.
Each position of the number represents
a specific weight.
We can express any decimal number in
tens, hundreds, thousands and so on.
Ex.4327 = 4(103)+3(102)+2(101)+7(100)
RNB Global University, Bikaner. 63Course Code - 19004000
64. Binary Codes
Weighted and Non Weighted code
Several systems of the codes are used
to express the decimal digits 0 through 9.
In these codes each decimal digit is
represented by a group of four bits.
RNB Global University, Bikaner. 64Course Code - 19004000
65. Binary Codes
Non-weighted code: In non-weighted
code, there is no positional weight i.e.
each position within the binary number is
not assigned a prefixed value.
No specific weights are assigned to bit
position in non-weighted code.
The non-weighted codes are:
1. The Excess-3 Code
2. The Gray Code
RNB Global University, Bikaner. 65Course Code - 19004000
66. Binary Codes
Non-weighted code:
1. The Excess-3 Code : The Excess-3
code is also called as XS-3 code. It is
non-weighted code used to express
decimal numbers.
The Excess-3 code words are derived
from the 8421 BCD code words adding
00112 or 310 to each code word in 8421.
RNB Global University, Bikaner. 66Course Code - 19004000
67. Binary Codes
Non-weighted code:
1. The Excess-3 Code :
RNB Global University, Bikaner. 67Course Code - 19004000
68. Binary Codes
Non-weighted code:
2. Gray Code : It is the non-weighted code
and it is not arithmetic codes. That
means there are no specific weights
assigned to the bit position.
It has a very special feature that, only
one bit will change each time the decimal
number is incremented as shown in fig.
RNB Global University, Bikaner. 68Course Code - 19004000
69. Binary Codes
Non-weighted code:
2. Gray Code : As only one bit changes at
a time, the gray code is called as a unit
distance code.
The gray code is a cyclic code. Gray
code cannot be used for arithmetic
operation.
RNB Global University, Bikaner. 69Course Code - 19004000
71. Binary Codes
Non-weighted code:
2. Gray Code : Application of Gray Code –
Gray code is popularly used in the shaft
position encoders.
A shaft position encoder produces a
code word which represents the angular
position of the shaft.
RNB Global University, Bikaner. 71Course Code - 19004000
72. Binary Coded Decimal (BCD) Code
In this code each decimal digit is
represented by a 4-bit binary number.
BCD is a way to express each of the
decimal digits with a binary code. In the
BCD, with four bits we can represent
sixteen numbers 0000to1111.
But in BCD code only first ten of these
are used 0000to1001. The remaining six
code combinations i.e. 1010 to 1111 are
invalid in BCD.
RNB Global University, Bikaner. 72Course Code - 19004000
73. Binary Coded Decimal (BCD) Code
Advantages of BCD Codes:
1. It is very similar to decimal system.
2. We need to remember binary equivalent of
decimal numbers 0 to 9 only.
RNB Global University, Bikaner. 73Course Code - 19004000
74. Binary Coded Decimal (BCD) Code
Disadvantages of BCD Codes
1. The addition and subtraction of BCD have
different rules.
2. The BCD arithmetic is little more
complicated.
3. BCD needs more number of bits than
binary to represent the decimal number.
So BCD is less efficient than binary.
RNB Global University, Bikaner. 74Course Code - 19004000
75. Alphanumeric codes
A binary digit or bit can represent only
two symbols as it has only two states '0'
or '1'.
But this is not enough for communication
between two computers because there
we need many more symbols for
communication.
These symbols are required to represent
26 alphabets with capital and small
letters, numbers from 0 to 9, punctuation
marks and other symbols.RNB Global University, Bikaner. 75Course Code - 19004000
76. Alphanumeric codes
The alphanumeric codes are the codes
that represent numbers and alphabetic
characters.
Mostly such codes also represent other
characters such as symbol and various
instructions necessary for conveying
information.
An alphanumeric code should at least
represent 10 digits and 26 letters of
alphabet i.e. total 36 items.
RNB Global University, Bikaner. 76Course Code - 19004000
77. Alphanumeric codes
The following three alphanumeric codes
are very commonly used for the data
representation.
1. American Standard Code for Information
Interchange ASCII.
2. Extended Binary Coded Decimal
Interchange Code EBCDIC.
3. Five bit Baudot Code.
RNB Global University, Bikaner. 77Course Code - 19004000
78. ASCII has 128 characters and symbols
represented by a 7-bit binary code.
It can be considered an 8-bit code with
the MSB always 0. (00h-7Fh)
00h-1Fh (the first 32) – control characters
20h-7Fh – graphics symbols (can be
printed or displayed).
RNB Global University, Bikaner. 78Course Code - 19004000
Alphanumeric codes
79. There are an additional 128 characters
that were adopted by IBM for use in their
PCs.
It’s popular and is used in applications
other than PCs, unofficial standard.
The extended ASCII characters are
represented by an 8-bit code series from
80h-FFh
7 Bit ASCII Characters
RNB Global University, Bikaner. 79Course Code - 19004000
Alphanumeric codes
80. Extended Binary Coded Decimal
Interchange Code (EBCDIC) is an
eight-bit character encoding used mainly
on IBM mainframe and IBM midrange
computer operating systems.
RNB Global University, Bikaner. 80Course Code - 19004000
Alphanumeric codes
81. The Baudot code, invented by Émile
Baudot, is a character set
predating EBCDIC and ASCII.
It was the predecessor to the
International Telegraph Alphabet No. 2
(ITA2), the teleprinter code in use until
the advent of ASCII.
RNB Global University, Bikaner. 81Course Code - 19004000
Alphanumeric codes
82. Each character in the alphabet is
represented by a series of five bits, sent
over a communication channel such as a
telegraph wire or a radio signal.
RNB Global University, Bikaner. 82Course Code - 19004000
Alphanumeric codes
83. Error Detection and Correction
Error is a condition when the output
information does not match with the input
information.
During transmission, digital signals suffer
from noise that can introduce errors in
the binary bits travelling from one system
to other.
RNB Global University, Bikaner. 83Course Code - 19004000
84. Error Detection and Correction
Error Detecting code: Whenever a
message is transmitted, it may get
scrambled by noise or data may get
corrupted.
To avoid this, we use error-detecting
codes which are additional data added to
a given digital message to help us detect
if an error occurred during transmission
of the message.
Ex- Parity Check.
RNB Global University, Bikaner. 84Course Code - 19004000
85. Error Detection and Correction
Error-Correcting codes: Along with error-
detecting code, we can also pass some
data to figure out the original message
from the corrupt message that we
received. This type of code is called an
error-correcting code.
These codes detect the exact location of
the corrupt bit.
In error-correcting codes, parity check
has a simple way to detect errors.
RNB Global University, Bikaner. 85Course Code - 19004000
86. Error Detection and Correction
How to Detect and Correct Errors?: To
detect and correct the errors, additional
bits are added to the data bits at the time
of transmission.
The additional bits are called parity bits.
They allow detection or correction of the
errors.
The data bits along with the parity bits form
a code word.
RNB Global University, Bikaner. 86Course Code - 19004000
87. Error Detection and Correction
Parity Checking of Error Detection:- It is
the simplest technique for detecting and
correcting errors.
The MSB of an 8-bits word is used as
the parity bit and the remaining 7 bits are
used as data or message bits. The parity
of 8-bits transmitted word can be either
even parity or odd parity.
RNB Global University, Bikaner. 87Course Code - 19004000
88. Error Detection and Correction
Even parity -- Even parity means the
number of 1's in the given word including
the parity bit should be even (2,4,6,....).
Odd parity -- Odd parity means the
number of 1's in the given word including
the parity bit should be odd (1,3,5,....).
RNB Global University, Bikaner. 88Course Code - 19004000
89. Error Detection and Correction
RNB Global University, Bikaner. 89Course Code - 19004000
90. Error Detection and Correction Codes
2. Repetition Code: The repetition code
makes use of repetitive transmission of
each data bit in the bit stream.
Three fold repetition, 1 would be
transmitted as 111 and 0 as 000.
The code becomes self-correcting if the
bit in the majority is taken as the correct
bit.
RNB Global University, Bikaner. 90Course Code - 19004000
91. Error Detection and Correction Codes
3.Cyclic Redundancy Checks Code:
RNB Global University, Bikaner. 91Course Code - 19004000
92. Error Detection and Correction Codes
3.Cyclic Redundancy Checks Code: This
Cyclic Redundancy Check is the most
powerful and easy to implement
technique.
CRC is based on binary division.
In CRC, a sequence of redundant bits,
called cyclic redundancy check bits, are
appended to the end of data unit so that
the resulting data unit becomes exactly
divisible by a second, predetermined
binary number.RNB Global University, Bikaner. 92Course Code - 19004000
93. Error Detection and Correction Codes
3.Cyclic Redundancy Checks Code: At the
destination, the incoming data unit is
divided by the same number. If at this
step there is no remainder, the data unit
is assumed to be correct and is therefore
accepted
A remainder indicates that the data unit
has been damaged in transit and
therefore must be rejected.
RNB Global University, Bikaner. 93Course Code - 19004000
94. Error Detection and Correction Codes
4. Hamming Code:- an increase in the
number of redundant bits added to
message bits can enhance the
capability of the code to detect and
correct errors.
RNB Global University, Bikaner. 94Course Code - 19004000
95. Error Detection and Correction Codes
If we have a sufficient number of
redundant bits, and if these bits can be
arranged such that different error bits
produce different error results, then it
should be possible not only to detect the
error bit but also to identify its location.
The addition of redundant bits alters the
‘distance’ code parameter, which has
come to be known as the Hamming
distance.
RNB Global University, Bikaner. 95Course Code - 19004000
96. Error Detection and Correction Codes
The Hamming distance is nothing but the
number of bit disagreements between
two code words.
RNB Global University, Bikaner. 96Course Code - 19004000
97. Boolean Algebra
Variable, complement, and literal are
terms used in Boolean algebra.
A variable is a symbol used to represent
a logical quantity. Any single variable
can have a 1 or a 0 value.
The complement is the inverse of a
variable and is indicated by a bar over
variable (over bar).
RNB Global University, Bikaner. 97Course Code - 19004000
98. Boolean Algebra
The complement of the variable A is read
as "not A" or "A bar“.
Sometimes a prime symbol rather than
an over bar is used to denote the
complement of a variable; for example,
B' indicates the complement of B.
A literal is a variable or the complement
of a variable.
RNB Global University, Bikaner. 98Course Code - 19004000
99. Boolean Algebra
Boolean Addition: Boolean addition is
equivalent to the OR operation.
In Boolean algebra, a sum term is a sum
of literals.
In logic circuits, a sum term is produced
by an OR operation with no AND
operations involved.
Ex- A + B, A + B, A + B + C & A + B + C
+ D.
RNB Global University, Bikaner. 99Course Code - 19004000
100. Boolean Algebra
Boolean Addition: A sum term is equal to
1 when one or more of the literals in the
term are 1.
A sum term is equal to 0 only if each of
the literals is 0.
Example - Determine the values of A, B,
C and D that make the sum term
A + B + C + D equal to 0.
RNB Global University, Bikaner. 100Course Code - 19004000
101. Boolean Algebra
Boolean Multiplication: Boolean
multiplication is equivalent to the AND
operation.
In Boolean algebra, a product term is the
product of literals.
In logic circuits, a product term is
produced by an AND operation with no
OR operations involved.
Ex.- AB, AB, ABC, and ABCD.
RNB Global University, Bikaner. 101Course Code - 19004000
102. Boolean Algebra
Boolean Multiplication: A product term is
equal to 1 only if each of the literals in
the term is 1.
A product term is equal to 0 when one or
more of the literals are 0.
Example - Determine the values of A, B,
C and D that make the product term
ABCD equal to 1.
RNB Global University, Bikaner. 102Course Code - 19004000
103. Boolean Algebra - Laws
1. Commutative Law: The commutative
law of addition for two variables is
written as A+B = B+A.
This law states that the order in which
the variables are ORed makes no
difference.
In Boolean algebra as applied to logic
circuits, addition and the OR operation
are the same.
RNB Global University, Bikaner. 103Course Code - 19004000
104. Boolean Algebra - Laws
RNB Global University, Bikaner. 104Course Code - 19004000
Above figure illustrates the commutative
law as applied to the OR gate and shows
that it doesn't matter to which input each
variable is applied.
105. Boolean Algebra - Laws
1. Commutative Law: The commutative
law of multiplication for two variables is
A.B = B.A
This law states that the order in which
the variables are ANDed makes no
difference.
RNB Global University, Bikaner. 105Course Code - 19004000
106. Boolean Algebra - Laws
2. Associative Law: The associative law of
addition is written as follows for three
variables: A + (B + C) = (A + B) + C.
This law states that when ORing more
than two variables, the result is the same
regardless of the grouping of the
variables.
RNB Global University, Bikaner. 106Course Code - 19004000
107. Boolean Algebra - Laws
2. Associative Law: The associative law of
multiplication is written as follows for
three variables: A(BC) = (AB)C.
This law states that it makes no
difference in what order the variables are
grouped when ANDing more than two
variables.
RNB Global University, Bikaner. 107Course Code - 19004000
108. Boolean Algebra - Laws
3. Distributive Law: The distributive law is
written for three variables as follows:
A(B + C) = AB + AC.
This law states that ORing two or more
variables and then ANDing the result
with a single variable is equivalent to
ANDing the single variable with each of
the two or more variables and then
ORing the products.
RNB Global University, Bikaner. 108Course Code - 19004000
109. Boolean Algebra - Laws
3. Distributive Law: The distributive law
also expresses the process of factoring
in which the common variable A is
factored out of the product terms, for
example, AB + AC = A(B + C).
RNB Global University, Bikaner. 109Course Code - 19004000
110. Boolean Algebra - Rules
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 110Course Code - 19004000
111. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 111Course Code - 19004000
112. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 112Course Code - 19004000
113. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 113Course Code - 19004000
114. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 114Course Code - 19004000
115. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 115Course Code - 19004000
116. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 116Course Code - 19004000
117. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 117Course Code - 19004000
118. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 118Course Code - 19004000
119. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 119Course Code - 19004000
120. Boolean Algebra - Laws
Rules of Boolean Algebra: .
RNB Global University, Bikaner. 120Course Code - 19004000
121. Boolean Algebra - Laws
Rules of Boolean Algebra: The proof is
shown in Table below, which shows the
truth table and the resulting logic circuit
simplification.
RNB Global University, Bikaner. 121Course Code - 19004000
122. Boolean Algebra - Laws
Rules of Boolean Algebra:.
RNB Global University, Bikaner. 122Course Code - 19004000
123. Boolean Algebra - Laws
Rules of Boolean Algebra:.
RNB Global University, Bikaner. 123Course Code - 19004000
124. Boolean Algebra - Laws
Rules of Boolean Algebra:.
RNB Global University, Bikaner. 124Course Code - 19004000
125. Boolean Algebra - Laws
Rules of Boolean Algebra:.
RNB Global University, Bikaner. 125Course Code - 19004000
126. Boolean Algebra - Laws
Rules of Boolean Algebra: 12 basic rules
that are useful in manipulating and
simplifying Boolean expressions.
Rules 1 through 9 will be viewed in terms
of their application to logic gates.
Rules 10 through 12 will be derived in
terms of the simpler rules and the laws
previously discussed.
RNB Global University, Bikaner. 126Course Code - 19004000
127. Boolean Algebra - Simplification
Boolean Expression for the a logic
circuit: .
RNB Global University, Bikaner. 127Course Code - 19004000
128. Boolean Algebra - Simplification
Boolean Expression for the a logic
circuit: To derive the Boolean expression
for a given logic circuit, begin at the
leftmost inputs and work toward the final
output, writing the expression for each
gate.
For the given circuit, the Boolean
expression is determined as follows:
RNB Global University, Bikaner. 128Course Code - 19004000
129. Boolean Algebra - Simplification
Boolean Expression for the a logic
circuit:
The expression for the left-most AND gate
with inputs C and D is CD.
The output of the left-most AND gate is one
of the inputs to the OR gate and B is the
other input. Therefore, the expression for
the OR gate is B + CD.
RNB Global University, Bikaner. 129Course Code - 19004000
130. Boolean Algebra - Simplification
Boolean Expression for the a logic
circuit:
The output of the OR gate is one of the
inputs to the right-most AND gate and A is
the other input. Therefore, the expression
for this AND gate is A(B + CD), which is the
final output expression for the entire circuit.
RNB Global University, Bikaner. 130Course Code - 19004000
131. Boolean Algebra - Simplification
Constructing Truth table for a logic Circuit:-.
Once the Boolean expression for a given logic
circuit has been determined, a truth table that
shows the output for all possible values of the
input variables can be developed.
The procedure requires that you evaluate the
Boolean expression for all possible
combinations of values for the input variables.
There are four input variables (A, B, C, and D)
and therefore sixteen (24 = 16) combinations
of values are possible.
RNB Global University, Bikaner. 131Course Code - 19004000
132. Boolean Algebra - Simplification
Constructing Truth table for a logic Circuit:-.
The first step is to list the sixteen input variable
combinations of 1s and 0s in a binary
sequence as shown in below table.
Next, place a 1 in the output column for each
combination of input variables that was
determined in the evaluation.
Finally, place a 0 in the output column for all
other combinations of input variables.
RNB Global University, Bikaner. 132Course Code - 19004000
133. Boolean Algebra - Simplification
Constructing Truth table for a logic Circuit:-.
RNB Global University, Bikaner. 133Course Code - 19004000
134. Review
Number Systems – Decimal, Binary, Octal,
Hexadecimal.
1’s and 2’s Complements.
Binary Arithmetic.
Interconversions.
Binary Coded Decimal (BCD), Gray code,
Excess Code, ASCII Code.
Error detection and Correction. 134RNB Global University, Bikaner.Course Code - 19004000