Unit-1 Material
Unit-1 Material
UNIT – I: Data Representation: Binary Numbers, Fixed Point Representation. Floating Point Representation.
Number base conversions, Octal and Hexadecimal Numbers, components, Signed binary numbers, Binary codes
Digital Logic Circuits-I: Basic Logic Functions, Logic gates, universal logic gates, Minimization of Logic
expressions. K-Map Simplification, Combinational Circuits, Decoders, Multiplexers
Analog system process information that varies continuously i.e; they process time varying signals
that can take on any values across a continuous range of voltage, current or any physical parameter.
Digital systems use digital circuits that can process digital signals which can take either 0 or 1
for binary system.
Q) Number systems
A number system relates quantities and symbols. In digital system how information is represented is key and
there are different radices, i.e. number bases, that a numbering system can use.
Number Representation:
It can have different base values like: binary (base-2), octal (base-8), decimal (base 10) and hexadecimal
(base 16),here the base number represents the number of digits used in that numbering system. As an
example, in decimal numbering system the digits used are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Therefore the digits
for binary are: 0 and 1, the digits for octal are: 0, 1, 2, 3, 4, 5, 6 and 7. For the hexadecimal numbering
system, base 16, the digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
Binary numbers
Numbers that contain only two digit 0 and 1 are called Binary Numbers.
The binary equivalent for some decimal numbers are given below
Decimal 0 1 2 3 4 5 6 7 8 9 10 11
There are two major approaches to store real numbers (i.e., numbers with fractional component) in modern
computing. These are (i) Fixed Point Notation and (ii) Floating Point Notation. In fixed point notation, there
are a fixed number of digits after the decimal point, whereas floating point number allows for a varying
number of digits after the decimal point.
Fixed-Point Representation −
This representation has fixed number of bits for integer part and for fractional part. For example, if given fixed-
point representation is IIII.FFFF, then you can store minimum value is 0000.0001 and maximum value is
9999.9999. There are three parts of a fixed-point number representation: the sign field, integer field, and fractional
field.
Example −Assume number is using 32-bit format which reserve 1 bit for the sign, 15 bits for the integer part
and 16 bits for the fractional part.
Then, -43.625 is represented as following:
The floating number representation of a number has two part: the first part represents a signed fixed point
number called mantissa. The second part of designates the position of the decimal (or binary) point and is
called the exponent.
MSB
Number systems are the technique to represent numbers in the computer system architecture,
every value that you are saving or getting into/from computer memory has a defined number
system.
A Binary number system has only two digits that are 0 and 1. Every number (value) represents
with 0 and 1 in this number system. The base of binary number system is 2, because it has only
two digits.
Octal number system has only eight (8) digits from 0 to 7. Every number (value) represents with
0,1,2,3,4,5,6 and 7 in this number system. The base of octal number system is 8, because it has
only 8 digits.
Decimal number system has only ten (10) digits from 0 to 9. Every number (value) represents with
0,1,2,3,4,5,6, 7,8 and 9 in this number system. The base of decimal number system is 10, because
it has only 10 digits.
A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to 9 and A to F. Every
number (value) represents with 0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in this number system. The
base of hexadecimal number system is 16, because it has 16 alphanumeric values. Here A is 10, B
is 11, C is 12, D is 14, E is 15 and F is 16.
Q) CONVERSIONS
DECIMAL TO OTHER
1. DECIMAL TO BINARY
To convert Number system from Decimal Number System to Any Other Base is quite easy; you
have to follow just two steps:
A) Divide the Number (Decimal Number) by the base of target base system (in which you want
to convert the number: Binary (2), octal (8) and Hexadecimal (16)).
B) Write the remainder from step 1 as a Least Signification Bit (LSB) to Step last as a Most
Significant Bit (MSB).
2. DECIMAL TO HEXADECIMAL
Hexadecimal Number
is
(3039)16
Example 2
Decimal Number is : (725)10 Hexadecimal Number
is
(2D5)16
Convert
10, 11, 12, 13, 14, 15
to its equivalent...
A, B, C, D, E, F
BINARY TO OTHER
A) Multiply the digit with 2(with place value exponent). Eventually add all the multiplication
becomes the Decimal number.
1. BINARY TO DECIMAL
2. BINARY TO OCTAL
An easy way to convert from binary to octal is to group binary digits into sets of three, starting
with the least significant (rightmost) digits.
Octal: 0 1 2 3 4 5 6 7
3. BINARY TO HEXADECIMAL
An equally easy way to convert from binary to hexadecimal is to group binary digits into sets of
four, starting with the least significant (rightmost) digits.
OCTAL TO OTHER
1. OCTAL TO BINARY
Converting from octal to binary is as easy as converting from binary to octal. Simply look up
each octal digit to obtain the equivalent group of three binary digits.
Octal: 0 1 2 3 4 5 6 7
Binary: 000 001 010 011 100 101 110 111
Octal = 3 4 5
Binary = 011 100 101 = 011100101 binary
When converting from octal to hexadecimal, it is often easier to first convert the octal number
into binary and then from binary into hexadecimal. For example, to convert 345 octal into hex:
Octal = 3 4 5
Drop any leading zeros or pad with leading zeros to get groups of four binary digits (bits):
Binary 011100101 = 1110 0101
Hexadecimal: 0 1 2 3 4 5 6 7
Hexadecimal: 8 9 A B C D E F
Hexadecimal = E 5 = E5 hex
Therefore, through a two-step conversion process, octal 345 equals binary 011100101 equals
hexadecimal E5.
3. OCTAL TO DECIMAL
The conversion can also be performed in the conventional mathematical way, by showing each
digit place as an increasing power of 8.
Converting from hexadecimal to binary is as easy as converting from binary to hexadecimal. Simply look
up each hexadecimal digit to obtain the equivalent group of four binary digits.
Hexadecimal: 0 1 2 3 4 5 6 7
Binary: 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal: 8 9 A B C D E F
Binary: 1000 1001 1010 1011 1100 1101 1110 1111
Hexadecimal = A 2 D E
Binary = 1010 0010 1101 1110 = 1010001011011110 binary
Simply, 7’s complement of a octal number is the subtraction of it’s each digits from 7. For example, 7’s
complement of octal number 127 is 777 - 127 = 650.
8’s complement of octal number is 7’s complement of given number plus 1 to the least significant bit
(LSB). For example 8’s complement of octal number 320 is (777 - 320) + 1 = 457 + 1 = 460. Please note
that maximum digit of octal number system is 7, so addition of 7+1 will be 0 with carry 1.
Example:
375
7’s Complement subtractions:
Method : 1's complement subtraction steps :
1. At first, find 1's complement of the B(subtrahend).
2. Then add it to the A(minuend).
3. If the final carry over of the sum is 1, then it is dropped and 1 is added to the result.
4. If there is no carry over, then 1's complement of the sum is the final result and it is negative.
Example 1:
1. Find Subtraction of 402 and 314 using 7's complement method
Here A = 402, B = 314.
Find A - B = ? using 7's complement
First find 7's complement of B = 314
Note : 7's complement of a number is obtained by subtracting all bits from 777.
7's complement of 314 is
KITS AKSHAR INSTITUTE OF TECHNOLOGY
DL & CO
777-314=463
Now Add this 7's complement of B to A
402+463=1065
The left most bit of the result is called carry and add it to the rest part of the result 065.
065+1=066
So answer is 066
Example 2: Find Subtraction of 342 and 614 using 7's complement method
Note : 7's complement of a number is obtained by subtracting all bits from 777.
7's complement of 614 is
777-614=163
Now Add this 7's complement of B to A
342+163=525
Here there is no carry, answer is - (7's complement of the sum obtained 525)
Note : 7's complement of a number is obtained by subtracting all bits from 777.
7's complement of 525 is
777-525=252
So answer is 252
So answer is 066
If the number is binary, then we use 1's complement and 2's complement. But in case, when the number is
a decimal number, we will use the 9's and 10's complement. The 10's complement is obtained from the 9's
complement of the number, and we can also find the 9's and 10's complement using the r's and (r-1)'s complement
formula.
9's Complement
The 9's complement is used to find the subtraction of the decimal numbers. The 9's complement of a
number is calculated by subtracting each digit of the number by 9. For example, suppose we have a number 1423,
and we want to find the 9's complement of the number. For this, we subtract each digit of the number 1423 by 9.
So, the 9's complement of the number 1423 is 9999-1423= 8576.
With the help of the 9's complement, the process of subtraction is done in a much easier way.
Generally, we subtract the subtrahend from the minuend, but in a case when we perform subtraction using 9's
complement, there is no need to do the same.
For subtracting two numbers using 9's complement, we first have to find the 9's complement
of the subtrahend and then we will add this complement value with the minuend. There are two possible cases when
we subtract the numbers using 9's complement.
For subtracting the smaller number from the larger number using 9's complement, we will find
the 9's complement of the subtrahend, and then we will add this complement value with the minuend. By adding
both these values, the result will come in the formation of carry. At last, we will add this carry to the result
obtained previously.
In this case, when we add the complement value and the minuend, the result will not come in the
formation of carry. This indicates that the number is negative, and for finding the final result, we need to find the
9's complement of the result.
10's Complement
The 10's complement is also used to find the subtraction of the decimal numbers. The 10's complement of
a number is calculated by subtracting each digit by 9 and then adding 1 to the result. Simply, by adding 1 to its
9's complement we can get its 10's complement value. For example, suppose we have a number 1423, and we
want to find the 10's complement of the number. For this, we find the 9's complement of the number 1423 that is
9999-1423= 8576, and now we will add 1 to the result. So the 10's complement of the number 1423 is
8576+1=8577.
For subtracting two numbers using 10's complement, we first have to find the 10's complement of the
subtrahend, and then we will add this complement value with the minuend. There are two possible cases when we
subtract the numbers using 10's complement.
For subtracting the smaller number from the larger number using 10's complement, we will find the 10's
complement of the subtrahend and then we will add this complement value with the minuend. By adding both these
In this case, when we add the complement value and the minuend, the result will not come in the formation
of carry. This indicates that the number is negative and for finding the final result, we need to find the 10's
complement of the result obtained by adding complement value of subtrahend and minuend.
Digital systems like computer, must be able to handle both positive and negative numbers.
A signed binary number consists of both sign and magnitude information.
The sign indicates whether a number is positive or negative.
Representation
There are three forms in which the signed integer (whole numbers) can be represented. They
include,
Note:
Negative numbers, are the 1’s complement of the corresponding positive numbers
(eg)
DL & CO
+25 is represented as,
1101 (sum)
BINARY SUBTRACTION
The binary subtraction table is as follows:
0110 (Difference)
BINARY MULTIPLICATION
The binary multiplication table is as follows:
A *B PRODUCT
0*0 0
0*1 0
Multiplicand * Multiplier
10110.1x01001.1
101101
101101
000000
000000 Partial Product
101101
000000
Step 1: The LSB of the multiplier is taken. If multiplier bit is 1, the multiplicand is copied as such and ifthe
multiplier bit is 0 zero is placed in all the bit positions.
Step 2: The next higher significant bit of the multiplier is taken and, the partial product is written with theshift
to the left, as in step 1.
Step 3: step 2 is repeated for all other higher significant bits.
Step 4: The partial product terms are added which gives the actual product of multiplier and themultiplicand.
BINARY DIVISION:
The binary division table is as follows:
A÷B Result
0÷0 Not allowed
0÷1 0
1÷0 Not allowed
1÷1 1
Dividend ÷ Divisor
11011.1÷ 101
101.1 (QUOTIENT) DIVISOR 101
√11011.1 (DIVIDEND)
101
111
101
101
101
Q) binary code
Binary codes are codes which are represented in binary system with modification from the original one.
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. The binary code is represented by the number as well as alphanumeric
letter.
Alphanumeric code
Weighted codes: Weighted binary codes are those binary codes which obey the positional weightprinciple.
Each position of the number represents a specific weight.In negatively weighted codes, some of the weight
assigned to the binary digits must be negative.
• Table below shows some of the positively weighted and negatively weighted codes.
UNWEIGHTED CODES
In this type of binary codes, the positional weights are not assigned. The examples of non-weighted codes are
Excess-3 code and Gray code
Here is a table showing how Excess-3 code is derived from 8421 BCD code.
0 0000 0011
1 0001 0100
2 0010 0101
3 0011 0110
4 0100 0111
5 0101 1000
6 0110 1001
7 0111 1010
8 1000 1011
9 1001 1100
For example, in 8421BCD code, 1001 the weights of 1, 0, 0, 1 (from left to right) are 8, 4, 2 and 1respectively. The
codes 8421BCD, 2421BCD, 5211BCD are all weighted codes.
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. 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.
Alpka⭲umcíic codcs
Computers work with only 0’s and 1’s. However, there is a need for more advanced forms of communication with
machines. This is why alphanumeric code is important. It includes 26 characters for the letters of the alphabet, and
10 more for symbols like !@#$%^&.
EBCDIC
EBCDIC stands for Extended Binary Coded Decimal Interchange Code. EBCDIC code is an 8-bit code
that is mainly used in IBM mainframe and IBM midrange computer operating systems.
ASCII
ASCII stands for American Standard Code for Information Interchange. ASCII code is a 7-bit code used
in smaller computers. ASCII code represents the numbers from 0 to 9, ninety-five upper and lowercase letters
of the alphabet, punctuation marks, and a blank space. In total, ASCII encodes 128 characters.
When data or instructions are electronically transmitted, there is a chance of errors during data transmission
in the form of scrambling or corruption of data. In order to avoid this, error-detecting codes are utilized.
An error detection code attaches additional data to a message before sending and this determines whether the
message was corrupted during data transmission.
A parity code is an error detection code where an extra bit (called a parity bit) is attached to the message to
make the number of 0’s and 1’s either even or odd depending on the type of parity.
Q) Logic gates
• Logic gates are the fundamental building blocks of digital systems.
• Logic gates are electronic circuits because they are made up of a number of electronic devices and
components.
• Inputs and outputs of logic gates can occur only in 2 levels. These two levels are termed HIGH and
LOW, or TRUE and FALSE, or ON and OFF or simply 1 and 0.
Types of Logic Gates
A logic gate is a digital gate that allows data to be manipulated. Logic gates, use logic to determine whether
or not to pass a signal. Logic gates, on the other hand, govern the flow of information based on a set of
rules.
The logic gates can be classified into the following major types:
1. Basic Logic Gates
There are three basic logic gates:
1. AND Gate
2. OR Gate
3. NOT Gate
2. Universal Logic Gates
KITS AKSHAR INSTITUTE OF TECHNOLOGY
DL & CO
In digital electronics, the following two logic gates are considered as universal logic gates:
1. NOR Gate
2. NAND Gate
3. Derived Logic Gates
The following two are the derived logic gates used in digital systems:
1. XOR Gate
2. XNOR Gate
Let us now discuss each of these types of logic gates in detail one-by-one.
AND Gate
In digital electronics, the AND gate is one of the basic logic gate that performs the logical multiplication of
inputs applied to it. It generates a high or logic 1 output, only when all the inputs applied to it are high or
logic 1. Otherwise, the output of the AND gate is low or logic 0.
Properties of AND Gate:
AND gate can accept two or more than two input values at a time.
When all of the inputs are logic 1, the output of this gate is logic 1.
The logic symbol of a two input AND gate is shown in the following figure.
Input Output
A B A AND B
Z=A.B 0 0 0
OR Gate 0 1 0
An OR gate have the following two properties:
It can have two or more input lines at a time.
1 0 0
When all of the inputs to the OR gate are low or logic 0, the
output of it is low or logic 0.
Z=A+B 1 1 1
Input Output
A B A OR B
0 0 0
0 1 1
Input Output
1 0 1
1 1 1
NOT Gate
The output of a NOT gate is complement or inverse of the input applied to it.
NOT gate takes only one output.
Input Output
A NOT A
0 1
NOR Gate 1 0
Thus, it can be expressed as, NOR Gate = OR Gate + NOT Gate
A NOR gate is an OR gate followed by a NOT gate.
A NOR gate can have two or more inputs and gives an output.
A NOR gate gives a high or logic 1 output only when its all inputs are low or logic 0.
C=nput Output
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
NAND Gate
The NAND gate is also represented as a combination of two basic logic gates namely, AND gate and NOT
gate. Hence, it can be expressed as
NAND Gate = AND Gate + NOT Gate
NAND gate can take two or more inputs at a time and produces one output based on the combination of
inputs applied.
NAND gate produces a low or logic 0 output only when its all inputs are high or logic 1.
Input Output
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
XOR Gate
XOR gate, which is used in digital circuits to perform modulo sum. It is also referred to as Exclusive OR gate or Ex-
OR gate. The XOR gate can take only two inputs at a time and give an output. The output of the XOR gate is high
or logic 1 only when its two inputs are dissimilar.
It can accept only two inputs at a time. There is nothing like a three or more input XOR gate.
The output of the XOR gate is logic 1 or high, when its inputs are dissimilar.
Input Output
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
XNOR Gate
It is also called the Ex-NOR or Exclusive NOR gate. It is a combination of two logic gates namely,
XOR gate and NOT gate. Thus, it can be expressed as,
The output of an XNOR gate is high or logic 1 when its both inputs are similar. Otherwise the
output is low or logic 0.
Here is the boolean expression of the XNOR gate.
Input Output
A B A XNOR B
0 0 1
0 1 0
1 0 0
KITS AKSHAR INSTITUTE OF TECHNOLOGY
DL & CO
Input Output
1 1 1
In many digital circuits and practical problems, we need to find expressions with minimum variables
We can minimize Boolean expressions of 3, 4 variables very easily using K-map without using any Boolean algebra
theorems.
K-map can take two forms:
1. Sum of product (SOP)
2. Product of Sum (POS)
Steps to Solve Expression using K-map
1. Select the K-map according to the number of variables.
2. Identify minterms or maxterms as given in the problem.
3. For SOP put 1’s in blocks of K-map respective to the minterms (0’s elsewhere).
KITS AKSHAR INSTITUTE OF TECHNOLOGY
DL & CO
4. For POS put 0’s in blocks of K-map respective to the max terms (1’s elsewhere).
5. Make rectangular groups containing total terms in power of two like 2,4,8 ..(except 1) and try to cover as
many elements as you can in one group.
6. From the groups made in step 5 find the product terms and sum them up for SOP form.
SOP FORM
1. K-map of 3 variables
Z= ?A,B,C(1,3,6,7)
Q) Combinational Circuit
Definition of Combinational Circuit
Combinational circuits are specially designed using multiple interconnected logic gates such that the output will
be generated by computing the logical combinations of the present input only.
Features of Combinational Circuit
In this output depends only upon present input.
It’s Speed is fast.
Easy designed.
There is no feedback between input and output.
It is time independent.
Elementary building blocks are Logic gates.
Used for both arithmetic and boolean operations.
A sequential circuit consists of logic gates whose outputs at any time are determined
from both the present combination of inputs and previous output. That means sequential circuits use
memory elements to store the value of previous output.
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.
A combinational circuit can have an n number of inputs and m number of outputs.
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
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
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.
In the block diagram, A0 and B0 represent the LSB of the four bit words A and B. Hence Full
Adder-0 is the lowest stage. Hence its Cin has been permanently made 0. The rest of the
connections are exactly same as those of n-bit parallel adder is shown in fig. The four bit parallel
adder is a very common logic circuit.
Block diagram
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 S0represents 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.
Half Subtractors
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
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
Multiplexers
Multiplexer is a special type of combinational circuit. There are n-data inputs, one output and m
select inputs with 2m = n. It is a digital circuit which selects one of the n data inputs and routes it
to the output. The selection of one of the n inputs is done by the selected inputs. Depending on
the digital code applied at the selected inputs, one out of n data sources is selected and
transmitted to the single output Y. E is called the strobe or enable input which is useful for the
cascading. It is generally an active low terminal that means it will perform the required operation
when it is low.
Block diagram
Block Diagram
Truth Table
Demultiplexers
A demultiplexer performs the reverse operation of a multiplexer i.e. it receives one input and
distributes it over several outputs. It has only one input, n outputs, m select input. At a time only
one output line is selected by the select lines and the input is transmitted to the selected output
line. A de-multiplexer is equivalent to a single pole multiple way switch as shown in fig.
1 : 2 demultiplexer
1 : 4 demultiplexer
1 : 16 demultiplexer
1 : 32 demultiplexer
Block diagram
Truth Table
Decoder
Code converters
BCD to seven segment decoders
Nixie tube decoders
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
Logic Circuit
Encoder
Encoder is a combinational circuit which is designed to perform the inverse operation of the
decoder. An encoder has n number of input lines and m number of output lines. An encoder
produces an m bit binary code corresponding to the digital input number. The encoder accepts an
n input digital word and converts it into an m bit another digital word.
Priority encoders
Decimal to BCD encoder
Octal to binary encoder
Hexadecimal to binary encoder
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 Y1Y1 = 11 irrespective of the other inputs.
Similarly if D3 = 0 and D2 = 1 then Y1 Y0 = 10 irrespective of the other inputs.
Block diagram
Logic Circuit
Sequential circuits: A sequential circuit is specified by a time sequence of inputs, outputs, and internal states. The
output of a sequential circuit depends not only on the combination of present inputs but also on the previous
outputs. Unlike combinational circuits, sequential circuits include memory elements with combinational circuits.
Q) Decoder
Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines
2 to 4 Decoder
Let 2 to 4 Decoder has two inputs A1 & A0 and four outputs Y3, Y2, Y1 & Y0. The block diagram of 2 to 4 decoder is
shown in the following figure.
One of these four outputs will be ‘1’ for each combination of inputs when enable, E is ‘1’. The Truth table of 2 to
4 decoder is shown below.
E A1 A0 Y3 Y2 Y1 Y0
0 x x 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
From Truth table, we can write the Boolean functions for each output as
Y3=E.A1.A0𝑌3=𝐸.𝐴1.𝐴0
Y2=E.A1.A0′𝑌2=𝐸.𝐴1.𝐴0′
Y1=E.A1′.A0𝑌1=𝐸.𝐴1′.𝐴0
Y0=E.A1′.A0′𝑌0=𝐸.𝐴1′.𝐴0′
Each output is having one product term. So, there are four product terms in total. We can implement these four
product terms by using four AND gates having three inputs each & two inverters. The circuit diagram of 2 to 4
decoder is shown in the following figure.
Therefore, the outputs of 2 to 4 decoder are nothing but the min terms of two input variables A1 & A0, when
enable, E is equal to one. If enable, E is zero, then all the outputs of decoder will be equal to zero.
Similarly, 3 to 8 decoder produces eight min terms of three input variables A2, A1 & A0 and 4 to 16 decoder
produces sixteen min terms of four input variables A3, A2, A1 & A0.
Multiplexer
A multiplexer is a combinational circuit that has many data inputs and a single output, depending on control or
select inputs. For N input lines, log2(N) selection lines are required, or equivalently, for input lines, n
selection lines are needed. Multiplexers are also known as “N-to-1 selectors,” parallel-to-serial converters, many-
to-one circuits, and universal logic circuits. They are mainly used to increase the amount of data that can be sent
over a network
Types of Mux
The Mux can be of different types based on input.two major types of mux which are
2×1 Mux
4×1 Mux
2×1 Multiplexer
The 2×1 is a fundamental circuit which is also known 2-to-1 multiplexer that are used to choose one signal from two
inputs and transmits it to the output. The 2×1 mux has two input lines, one output line, and a single selection line. It
has various applications in digital systems such as in microprocessor it is used to select between two different data
sources or between two different instructions.
Block Diagram of 2:1 Multiplexer with Truth Table
Given Below is the Block Diagram and Truth Table of 2:1 Mux. In this Block Diagram where I0 and I1 are the input
lines ,Y is the output line and S0 is a single select line.
The output of the 2×1 Mux will depend on the selection line S0,
When S is 0(low), the I0 is selected
when S0 is 1(High), /1 is selected
Logical Expression of 2×1 Mux
Using the Truth Table ,the Logical Expression for Mux can be determined as
The output of the multiplexer is determined by the binary value of the selection lines
When S1S0=00, the input I0 is selected.
When S1S0=01, the input I1 is selected.
When S1S0=10, the input I2 is selected.
When S1S0=11, the input I3 is selected.
Truth Table of 4×1 Multiplexer
Multiplexer can act as universal combinational circuit. All the standard logic gates can be
implemented with multiplexers.