Professional Documents
Culture Documents
Coa 1
Coa 1
Boolean Algebra is used to analyze and simplify the digital (logic) circuits. It uses only the
binary numbers i.e. 0 and 1. It is also called as Binary Algebra or logical Algebra. Boolean
algebra was invented by George Boole in 1854.
Logic gates
Logic gates are the basic building blocks of any digital system. It is an electronic circuit having
one or more than one input and only one output. The relationship between the input and the
output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate,
NOT gate etc.
AND Gate
A circuit which performs an AND operation is shown in figure. It has n input (n >= 2) and one
output.
Logic diagram
Truth Table
OR Gate
A circuit which performs an OR operation is shown in figure. It has n input (n >= 2) and one
output.
Logic diagram
Truth Table
NOT Gate
NOT gate is also known as Inverter. It has one input A and one output Y.
Logic diagram
Truth Table
NAND Gate
A NOT-AND operation is known as NAND operation. It has n input (n >= 2) and one output.
Logic diagram
Truth Table
NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output.
Logic diagram
Truth Table
XOR Gate
XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full adder and
subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometime as X-OR gate. It
has n input (n >= 2) and one output.
Logic diagram
Truth Table
XNOR Gate
XNOR gate is a special type of gate. It can be used in the half adder, full adder and subtractor.
The exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR gate. It has n
input (n >= 2) and one output.
Logic diagram
Truth Table
Arithmetic Operations
Binary arithmetic is essential part of all the digital computers and many other digital system.
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary
addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given
column and a carry of 1 over to the next column.
Example − Addition
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary
subtraction. There are four rules of binary subtraction.
Example − Subtraction
Binary Multiplication
Example − Multiplication
Binary Division
Binary division is similar to decimal division. It is called as the long division procedure.
Example − Division
Each position in an octal number represents a 0 power of the base (8). Example: 8 0
Last position in an octal number represents an x power of the base (8). Example:
8x where x represents the last position - 1.
Example
Octal Number − 125708
Octal Addition
Following octal addition table will help you to handle octal addition.
To use this table, simply follow the directions used in this example: Add 68 and 58. Locate 6 in
the A column then locate the 5 in the B column. The point in 'sum' area where these two
columns intersect is the 'sum' of two numbers.
68 + 58 = 138.
Example − Addition
Octal Subtraction
The subtraction of octal numbers follows the same rules as the subtraction of numbers in any
other number system. The only variation is in borrowed number. In the decimal system, you
borrow a group of 1010. In the binary system, you borrow a group of 210. In the octal system you
borrow a group of 810.
Example − Subtraction
Letters represents numbers starting from 10. A = 10, B = 11, C = 12, D = 13, E = 14, F =
15.
Each position in a hexadecimal number represents a 0 power of the base (16). Example −
160
Last position in a hexadecimal number represents an x power of the base (16). Example
− 16x where x represents the last position - 1.
Example
Hexadecimal Number − 19FDE16
Step 2 19FDE16 ((1 × 164) + (9 × 163) + (15 × 162) + (13 × 161) + (14 ×
160))10
Hexadecimal Addition
Following hexadecimal addition table will help you greatly to handle Hexadecimal addition.
To use this table, simply follow the directions used in this example − Add A16 and 516. Locate A
in the X column then locate the 5 in the Y column. The point in 'sum' area where these two
columns intersect is the sum of two numbers.
A16 + 516 = F16.
Example − Addition
Hexadecimal Subtraction
The subtraction of hexadecimal numbers follow the same rules as the subtraction of numbers in
any other number system. The only variation is in borrowed number. In the decimal system, you
borrow a group of 1010. In the binary system, you borrow a group of 2 10. In the hexadecimal
system you borrow a group of 1610.
Example - Subtraction
Questions:
Addition of following numbers :- a). 11011+10110 , b) 52437+31456 , c) FAD3E+4AEB6
Example - Addition a)
11
100
11
1111
1111
1111
101101
ORing of the variables is represented by a plus (+) sign between them. For example
ORing of A, B, C is represented as A + B + C.
Logical ANDing of the two or more variable is represented by writing a dot between
them such as A.B.C. Sometime the dot may be omitted like ABC.
Boolean Laws
Commutative law
Any binary operation which satisfies the following expression is referred to as commutative
operation.
Commutative law states that changing the sequence of the variables does not have any effect on
the output of a logic circuit.
Associative law
This law states that the order in which the logic operations are performed is irrelevant as their
effect is the same.
Distributive law
These laws use the AND operation. Therefore they are called as AND laws.
OR law
These laws use the OR operation. Therefore they are called as OR laws.
INVERSION law
This law uses the NOT operation. The inversion law states that double inversion of a variable
results in the original variable itself.
Map Simplification
• The expression may be simplified using the basic relations of Boolean algebra.
• However, this procedure is sometimes difficult because it lacks specific rules for
predicting each succeeding step in the manipulative process.
• The map method provides a simple, straight forward procedure for simplifying Boolean
expressions.
• It allows an easy interpretation for choosing the minimum number of terms needed to
express the function algebraically.
• Each combination of the variables in a truth table is called a minterm. For example, the
truth table of below Fig. contains eight minterms.
• The information contained in a truth table may be expressed in compact form by listing
the decimal equivalent of those minterms that produce a 1 for the function.
• For example, the truth table of given Fig below can be expressed as follows:
• F(x, y, z) = Σ(1, 4, 5, 6, 7)
•
Simplification
Combinational circuit
Combinational circuit is a circuit in which we combine the different gates in the circuit, for
example encoder, decoder, multiplexer and demultiplexer. Some of the characteristics of
combinational circuits are following −
The output of combinational circuit at any instant of time, depends only on the levels
present at input terminals.
The combinational circuit do not use any memory. The previous state of input does not
have any effect on the present state of the circuit.
Block diagram
Half Adder
Half adder is a combinational logic circuit with two inputs and two outputs. The half adder
circuit is designed to add two single bit binary number A and B. It is the basic building block
for addition of two single bit numbers. This circuit has two outputs carry and sum.
Block diagram
Truth Table
Circuit Diagram
Full Adder:-
Full adder is developed to overcome the drawback of Half Adder circuit. It can add two one-bit
numbers A and B, and carry c. The full adder is a three input and two output combinational
circuit.
Block diagram
Truth Table
Circuit Diagram
The Full Adder is capable of adding only two single digit binary number along with a carry
input. But in practical we need to add binary numbers which are much longer than just one bit.
To add two n-bit binary numbers we need to use the n-bit parallel adder. It uses a number of full
adders in cascade. The carry output of the previous full adder is connected to carry input of the
next full adder.
Block diagram
Half subtractor is a combination circuit with two inputs and two outputs (difference and
borrow). It produces the difference between the two binary bits at the input and also produces
an output (Borrow) to indicate if a 1 has been borrowed. In the subtraction (A-B), A is called as
Minuend bit and B is called as Subtrahend bit.
Truth Table
Circuit Diagram
Full Subtractors
The disadvantage of a half subtractor is overcome by full subtractor. The full subtractor is a
combinational circuit with three inputs A,B,C and two output D and C'. A is the 'minuend', B is
'subtrahend', C is the 'borrow' produced by the previous stage, D is the difference output and C'
is the borrow output.
Truth Table
Circuit Diagram
N-Bit Parallel Subtractor
The subtraction can be carried out by taking the 1's or 2's complement of the number to be
subtracted. For example we can perform the subtraction (A-B) by adding either 1's or 2's
complement of B to A. That means we can use a binary adder to perform the binary subtraction.
The number to be subtracted (B) is first passed through inverters to obtain its 1's complement.
The 4-bit adder then adds A and 2's complement of B to produce the subtraction.
S3 S2 S1 S0 represents the result of binary subtraction (A-B) and carry output Cout represents the
polarity of the result. If A > B then Cout = 0 and the result of binary form (A-B) then Cout = 1
and the result is in the 2's complement form.
Block diagram
Multiplexers
A Multiplexer (MUX) can be described as a combinational circuit that receives binary
information from one of the 2^n input data lines and directs it to a single output line.
The selection of a particular input data line for the output is decided on the basis of selection
lines.
The multiplexer is often called as data selector since it selects only one of many data inputs.
Many to single circuit
Parallel to serial convertor
.
Block diagram
Multiplexers come in multiple variations
2 : 1 multiplexer
4 : 1 multiplexer
16 : 1 multiplexer
32 : 1 multiplexer
S1 S0 y
0 0 I0
0 1 I1
1 0 I2
1 1 13
From the function table, we can write the Boolean function for the output (y) as:
The above equation for output 'y' can be implemented using inverters, three-input AND gates and
an OR gate.
8 *1 multiplexer
We can also implement higher order multiplexers using lower order multiplexers. For
instance, let us implement an 8 *1 multiplexer using two 4*1 multiplexers and a 2*1
multiplexer.
The two 4*1 multiplexers are required in the first stage to get the eight input data lines.
A 2*1 multiplexer is required in the second stage to converge the outputs generated at first
stage into a single output.
The following image shows the block diagram of an 8*1 multiplexer designed using two 4*1
multiplexers and a single 2*1 multiplexer.
A set of common selection lines (S1 and S2) are applied to both of the 4*1 multiplexers.
The output generated by both of the 4*1 multiplexers is applied as inputs of the 2*1 multiplexer.
The function table for an 8*1 multiplexer can be represented as:
S2 S1 S0 y
0 0 0 10
0 0 1 I1
0 1 0 I2
0 1 1 I3
1 0 0 I4
1 0 1 I5
1 1 0 I6
1 1 1 17
Demultiplexers
A De-multiplexer (De-Mux) can be described as a combinational circuit that performs the
reverse operation of a Multiplexer.
A De-multiplexer has a single input, 'n' selection lines and a maximum of 2^n outputs.
1 : 2 demultiplexer
1 : 4 demultiplexer
1 : 16 demultiplexer
1 : 32 demultiplexer.
1 * 4 De-multiplexer
The following image shows the block diagram of a 1 * 4 De-multiplexer.
S1 S0 y3 y2 y1 y0
0 0 0 0 0 I
0 1 0 0 I 0
1 0 0 I 0 0
1 1 I 0 0 0
From the above function table, we can write the Boolean function for each output as:
1 * 8 De-multiplexer
We can also implement higher order De-multiplexers using lower order De-multiplexers. For
instance, let us implement a 1 * 8 De-multiplexer using 1 * 2 De-multiplexer in the first stage
followed by two 1 * 4 De-multiplexers in the second stage.
S2 S1 S0 y7 y6 y5 y4 y3 y2 y1 y0
0 0 0 0 0 0 0 0 0 0 I
0 0 1 0 0 0 0 0 0 I 0
0 1 0 0 0 0 0 0 I 0 0
0 1 1 0 0 0 0 I 0 0 0
1 0 0 0 0 0 I 0 0 0 0
1 0 1 0 0 I 0 0 0 0 0
1 1 0 0 I 0 0 0 0 0 0
1 1 1 I 0 0 0 0 0 0 0
The Selection lines 'S1' and 'S0' are common for both of the 1 * 4 De-multiplexers.
Decoder
A Decoder can be described as a combinational circuit that converts binary information from
the 'n' coded inputs to a maximum of 2^n different outputs.
The most preferred or commonly used decoders are n-to-m decoders, where m<= 2^n.
An n-to-m decoder has n inputs and m outputs and is also referred to as an n * m decoder.
Block diagram
Relay actuator
2 to 4 Line Decoder
The block diagram of 2 to 4 line decoder is shown in the fig. A and B are the two inputs where
D through D are the four outputs. Truth table explains the operations of a decoder. It shows that
each output is 1 for only a specific combination of inputs.
Block diagram
The following image shows a 3-to-8 line decoder with three input variables which are decoded
into eight output, each output representing one of the combinations of the three binary input
variables.
The three inverter gates provide the complement of the inputs corresponding to which the eight
AND gates at the output generates one binary combination for each input.
The truth table for a 3-to-8 line decoder can be represented as:
x y z D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
It is also possible to combine two or more decoders to form a large decoder whenever needed.
For instance, we can construct a 3 * 8 decoder by combining two 2 *4 decoders.
Encoders
An encoder can also be described as a combinational circuit that performs the inverse operation
of a decoder. An encoder has a maximum of 2^n (or less) input lines and n output lines.
In an Encoder, the output lines generate the binary code corresponding to the input value.
The following image shows the block diagram of a 4 * 2 encoder with four input and two output
lines.
Block diagram
Examples of Encoders are following.
Priority encoders
Priority Encoder
This is a special type of encoder. Priority is given to the input lines. If two or more input line
are 1 at the same time, then the input line with highest priority will be considered. There are
four input D0, D1, D2, D3 and two output Y0, Y1. Out of the four input D3 has the highest priority
and D0 has the lowest priority. That means if D3 = 1 then Y1 Y1 = 11 irrespective of the other
inputs. Similarly if D3 = 0 and D2 = 1 then Y1 Y0 = 10 irrespective of the other inputs.
Block diagram
From the truth table, we can write the Boolean function for each output as:
D1 = A3 + A2
D0 = A3 + A1
The circuit diagram for a 4-to-2 line encoder can be represented by using two input OR gates.
8 * 3 line encoder
The most common application of an encoder is the Octal-to-Binary encoder.
Octal to binary encoder takes eight input lines and generates three output lines.
The following image shows the block diagram of an 8 * 3 line encoder.
From the truth table, we can write the Boolean function for each output as:
x = D4 + D5 + D6 + D7
y = D2 + D3 + D6 + D7
z = D1 + D3 + D5 + D7
The circuit diagram for an 8 * 3 line encoder can be represented by using two input OR gates.
Arithmetic Operations Algorithm And Hardware