Unit 1
Unit 1
Unit 1
Number System
In a digital system, the system can understand only the optional number system. In these
systems, digits symbols are used to represent different values, depending on the index from
which it settled in the number system.
In simple terms, for representing the information, we use the number system in the digital
system.
In the digital computer, there are various types of number systems used for representing
information.
1. Binary Number System
2. Decimal Number System
3. Hexadecimal Number System
4. Octal Number System
Generally, a binary number system is used in the digital computers. In this number system, it
carries only two digits, either 0 or 1. There are two types of electronic pulses present in a binary
number system. The first one is the absence of an electronic pulse representing '0'and second
one is the presence of electronic pulse representing '1'. Each digit is known as a bit. A four-bit
collection (1101) is known as a nibble, and a collection of eight bits (11001010) is known as a
byte. The location of a digit in a binary number represents a specific power of the base (2) of
the number system.
Characteristics:
1. It holds only two values, i.e., either 0 or 1.
2. It is also known as the base 2 number system.
3. The position of a digit represents the 0 power of the base (2). Example: 20
4. The position of the last digit represents the x power of the base (2). Example: 2x, where
x represents the last position, i.e., 1
Examples:
The decimal numbers are used in our day to day life. The decimal number system contains ten
digits from 0 to 9(base 10). Here, the successive place value or position, left to the decimal
point holds units, tens, hundreds, thousands, and so on.
The position in the decimal number system specifies the power of the base (10). The 0 is the
minimum value of the digit, and 9 is the maximum value of the digit. For example, the decimal
number 2541 consist of the digit 1 in the unit position, 4 in the tens position, 5 in the hundreds
position, and 2 in the thousand positions and the value will be written as:
(2×1000) + (5×100) + (4×10) + (1×1)
(2×103) + (5×102) + (4×101) + (1×100)
2000 + 500 + 40 + 1
The octal number system has base 8(means it has only eight digits from 0 to 7). There are only
eight possible digit values to represent a number. With the help of only three bits, an octal
number is represented. Each set of bits has a distinct value between 0 and 7.
Characteristics:
1. An octal number system carries eight digits starting from 0, 1, 2, 3, 4, 5, 6, and 7.
2. It is also known as the base 8 number system.
3. The position of a digit represents the 0 power of the base(8). Example: 80
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
4. The position of the last digit represents the x power of the base(8). Example: 8x, where
x represents the last position, i.e., 1
Examples:
It is another technique to represent the number in the digital system called the hexadecimal
number system. The number system has a base of 16 means there are total 16 symbols(0, 1,
2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) used for representing a number. The single-bit
representation of decimal values10, 11, 12, 13, 14, and 15 are represented by A, B, C, D, E,
and F. Only 4 bits are required for representing a number in a hexadecimal number. Each set
Characteristics:
1. It has ten digits from 0 to 9 and 6 letters from A to F.
2. The letters from A to F defines numbers from 10 to 15.
3. It is also known as the base 16number system.
4. In hexadecimal number, the position of a digit represents the 0 power of the base(16).
Example: 160
5. In hexadecimal number, the position of the last digit represents the x power of the
base(16). Example: 16x, where x represents the last position, i.e., 1
Binary Number Hexadecimal Number
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
In our previous section, we learned different types of number systems such as binary, decimal,
octal, and hexadecimal. In this part of the tutorial, we will learn how we can change a number
from one number system to another number system.
As, we have four types of number systems so each one can be converted into the remaining
three systems. There are the following conversions possible in Number System
1. Binary to other Number Systems.
2. Decimal to other Number Systems.
3. Octal to other Number Systems.
4. Hexadecimal to other Number Systems.
There are three conversions possible for binary number, i.e., binary to decimal, binary to octal,
and binary to hexadecimal. The conversion process of a binary number to decimal differs from
the remaining others. Let's take a detailed discussion on Binary Number System conversion.
The process of converting binary to decimal is quite simple. The process starts from
multiplying the bits of binary number with its corresponding positional weights. And lastly, we
add all those products.
Example 1: (10110.001)2
We multiplied each bit of (10110.001)2 with its respective positional weight, and last we add
the products of all the bits with its weight.
(10110.001)2=(1×24)+(0×23)+(1×22)+(1×21)+(0×20)+
(0×2-1)+(0×2-2)+(1×2-3)
(10110.001)2=(1×16)+(0×8)+(1×4)+(1×2)+(0×1)+
(0×1⁄2)+(0×1⁄4)+(1×1⁄8)
(10110.001)2=16+0+4+2+0+0+0+0.125
(10110.001)2=(22.125 )10
The base numbers of binary and octal are 2 and 8, respectively. In a binary number, the pair of
three bits is equal to one octal digit. There are only two steps to convert a binary number into
an octal number which are as follows:
1. In the first step, we have to make the pairs of three bits on both sides of the binary point.
If there will be one or two bits left in a pair of three bits pair, we add the required
number of zeros on extreme sides.
2. In the second step, we write the octal digits corresponding to each pair.
Example 1: (111110101011.0011)2
1. Firstly, we make pairs of three bits on both sides of the binary point.
On the right side of the binary point, the last pair has only one bit. To make it a complete pair
of three bits, we added two zeros on the extreme side.
(111110101011.0011)2= (7653.14)8
The base numbers of binary and hexadecimal are 2 and 16, respectively. In a binary number,
the pair of four bits is equal to one hexadecimal digit. There are also only two steps to convert
a binary number into a hexadecimal number which are as follows:
1. In the first step, we have to make the pairs of four bits on both sides of the binary point.
If there will be one, two, or three bits left in a pair of four bits pair, we add the required
number of zeros on extreme sides.
6 CHARAN’S DEGREE COLLEGE
2. In the second step, we write the hexadecimal digits corresponding to each pair.
1. Firstly, we make pairs of four bits on both sides of the binary point.
On the left side of the binary point, the first pair has three bits. To make it a complete pair of
four bits, add one zero on the extreme side.
(011110101011.0011)2=(7AB.3)16
The decimal number can be an integer or floating-point integer. When the decimal number is
a floating-point integer, then we convert both part (integer and fractional) of the decimal
number in the isolated form(individually). There are the following steps that are used to convert
the decimal number into a similar number of any base 'r'.
1. In the first step, we perform the division operation on integer and successive part with
base 'r'. We will list down all the remainders till the quotient is zero. Then we find out
the remainders in reverse order for getting the integer part of the equivalent number of
base 'r'. In this, the least and most significant digits are denoted by the first and the last
remainders.
2. In the next step, the multiplication operation is done with base 'r' of the fractional and
successive fraction. The carries are noted until the result is zero or when the required
number of the equivalent digit is obtained. For getting the fractional part of the
equivalent number of base 'r', the normal sequence of carrying is considered.
For converting decimal to binary, there are two steps required to perform, which are as follows:
1. In the first step, we perform the division operation on the integer and the successive
quotient with the base of binary(2).
2. Next, we perform the multiplication on the integer and the successive quotient with the
base of binary(2).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 2.
Operation Quotient Remainder
152/2 76 0 (LSB)
76/2 38 0
38/2 19 0
19/2 9 1
9/2 4 1
4/2 2 0
2/2 1 0
1/2 0 1(MSB)
(152)10=(10011000)2
Step 2:
Now, perform the multiplication of 0.25 and successive fraction with base 2.
Operation Result
0.25×2 0.50
0.50×2 0
(0.25)10=(.01)2
For converting decimal to octal, there are two steps required to perform, which are as follows:
1. In the first step, we perform the division operation on the integer and the successive
quotient with the base of octal(8).
2. Next, we perform the multiplication on the integer and the successive quotient with the
base of octal(8).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
Operation Quotient Remainder
152/8 19 0
19/8 2 3
2/8 0 2
(152)10=(230)8
Step 2:
Now perform the multiplication of 0.25 and successive fraction with base 8.
Operation Result carry
0.25×8 0 2
(0.25)10=(2)8
For converting decimal to hexadecimal, there are two steps required to perform, which are as
follows:
1. In the first step, we perform the division operation on the integer and the successive
quotient with the base of hexadecimal (16).
2. Next, we perform the multiplication on the integer and the successive quotient with the
base of hexadecimal (16).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
Operation Quotient Remainder
152/16 9 8
9/16 0 9
(152)10=(98)16
Step 2:
Now perform the multiplication of 0.25 and successive fraction with base 16.
0.25×16 0 4
(0.25)10=(4)16
Like binary and decimal, the octal number can also be converted into other number systems.
The process of converting octal to decimal differs from the remaining one. Let's start
understanding how conversion is done.
The process of converting octal to decimal is the same as binary to decimal. The process starts
from multiplying the digits of octal numbers with its corresponding positional weights. And
lastly, we add all those products.
Example 1: (152.25)8
Step 1:
We multiply each digit of 152.25 with its respective positional weight, and last we add the
products of all the bits with its weight.
(152.25)8=(1×82)+(5×81)+(2×80)+(2×8-1)+(5×8-2)
(152.25)8=64+40+2+(2×1⁄8)+(5×1⁄64)
(152.25)8=64+40+2+0.25+0.078125
(152.25)8=106.328125
The process of converting octal to binary is the reverse process of binary to octal. We write the
three bits binary code of each octal number digit.
Example 1: (152.25)8
(152.25)8=(001101010.010101)2
For converting octal to hexadecimal, there are two steps required to perform, which are as
follows:
1. In the first step, we will find the binary equivalent of number 25.
2. Next, we have to make the pairs of four bits on both sides of the binary point. If there
will be one, two, or three bits left in a pair of four bits pair, we add the required number
of zeros on extreme sides and write the hexadecimal digits corresponding to each pair.
Example 1: (152.25)8
Step 1:
(152.25)8=(001101010.010101)2
Step 2:
0 0110 1010.0101 01
On the left side of the binary point, the first pair has only one digit, and on the right side, the
last pair has only two-digit. To make them complete pairs of four bits, add zeros on extreme
sides.
Like binary, decimal, and octal, hexadecimal numbers can also be converted into other number
systems. The process of converting hexadecimal to decimal differs from the remaining one.
Let's start understanding how conversion is done.
The process of converting hexadecimal to decimal is the same as binary to decimal. The process
starts from multiplying the digits of hexadecimal numbers with its corresponding positional
weights. And lastly, we add all those products.
Let's take an example to understand how the conversion is done from hexadecimal to decimal.
Example 1: (152A.25)16
Step 1:
We multiply each digit of 152A.25 with its respective positional weight, and last we add the
products of all the bits with its weight.
(152A.25)16=(1×163)+(5×162)+(2×161)+(A×160)+(2×16-1)+(5×16-2)
(152A.25)16=(1×4096)+(5×256)+(2×16)+(10×1)+(2×16-1)+(5×16-2)
(152A.25)16=4096+1280+32+10+(2×1⁄16)+(5×1⁄256)
(152A.25)16=5418+0.125+0.125
(152A.25)16=5418.14453125
Example 1: (152A.25)16
For converting hexadecimal to octal, there are two steps required to perform, which are as
follows:
1. In the first step, we will find the binary equivalent of the hexadecimal number.
2. Next, we have to make the pairs of three bits on both sides of the binary point. If there
will be one or two bits left in a pair of three bits pair, we add the required number of
zeros on extreme sides and write the octal digits corresponding to each pair.
Example 1: (152A.25)16
Step 1:
Step 2:
3. Then, we make pairs of three bits on both sides of the binary point.
(001010100101010.001001010)2=(12452.112)8
• Sign-Magnitude form
• 1’s complement form
• 2’s complement form
Representation of a positive number in all these 3 forms is same. But, only the representation
of negative number will differ in each form.
Sign-Magnitude form
In sign-magnitude form, the MSB is used for representing sign of the number and the
remaining bits represent the magnitude of the number. So, just include sign bit at the left most
side of unsigned binary number. This representation is similar to the signed decimal numbers
representation.
Example
Consider the negative decimal number -108. The magnitude of this number is 108. We know
the unsigned binary representation of 108 is 1101100. It is having 7 bits. All these bits
represent the magnitude.
Since the given number is negative, consider the sign bit as one, which is placed on left most
side of magnitude.
−108−10810 = 11101100111011002
Therefore, the sign-magnitude representation of -108 is 11101100.
9’s complement:
The 9’s complement of a binary number can be obtained by subtracting each digit of the
number from 9.
-1267
Ans: 8732
10’s complement:
The 10’s complement of a number can be obtained by subtracting each digit of the number
from 9 and then adding to 1 to the least significant digit of the result.
Example : find the 10’ s complement of number 2456
9’s complement : 9999
-2456
Ans: 7543
Add 1 +1
10’s complement 7544
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
There are three different cases possible when we add two binary numbers using 2's
complement, which is as follows:
Case 1: Addition of the positive number with a negative number when the positive
number has a greater magnitude.
Initially find the 2's complement of the given negative number. Sum up with the given positive
number. If we get the end-around carry 1 then the number will be a positive number and the
carry bit will be discarded and remaining bits are the final result.
Initially, add a positive value with the 2's complement value of the negative number. Here, no
end-around carry is found. So, we take the 2's complement of the result to get the final result.
In this case, first, find the 2's complement of both the negative numbers, and then we will add
both these complement numbers. In this case, we will always get the end-around carry, which
will be added to the LSB, and forgetting the final result, we will take the2's complement of the
result.
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary
subtraction. There are four rules of binary subtraction.
These are the following steps to subtract two binary numbers using 1's complement
o In the first step, find the 1's complement of the subtrahend.
o Next, add the complement number with the minuend.
o If got a carry, add the carry to its LSB. Else take 1's complement of the result which
will be negative
Note: the subtrahend value always get subtracted from minuend.
We take 1's complement of subtrahend 00111, which comes out 11000. Now, sum them. So,
10101+11000 =1 01101.
In the above result, we get the carry bit 1, so add this to the LSB of a given result, i.e.,
01101+1=01110, which is the answer.
We take 1's complement of subtrahend 10111, which comes out 01000. Now, add both of the
numbers. So,
10101+01000 =11101.
In the above result, we didn't get the carry bit. So calculate the 1's complement of the result,
i.e., 00010, which is the negative number and the final answer.
(iii) If the final carry over of the sum is 1, it is dropped and the result is positive.
(iv) If there is no carry over, the two’s complement of the sum will be the result and it is
negative.
The following examples on subtraction by 2’s complement will make the procedure clear:
Evaluate:
Solution:
The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number of
bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the
subtrahend.
Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend.
1 1 0 1 1 0 Minuend
After dropping the carry over we get the result of subtraction to be 100000.
Solution:
Result of addition - 1 1 1 0 0
As there is no carry over, the result of subtraction is negative and is obtained by writing the 2’s
complement of 11100 i.e.(00011 + 1) or 00100.
Solution:
Carry over 1 0 0 0 1 . 1 0
After dropping the carry over we get the result of subtraction as 1.10.
Solution:
Result of addition - 1 1 0 0 0 . 1 1
As there is no carry over the result of subtraction is negative and is obtained by writing the 2’s
complement of 11000.11.
• Weighted Codes
• Non-Weighted Codes
• Binary Coded Decimal Code
• Alphanumeric Codes
• Error Detecting Codes
• Error Correcting Codes
Weighted Codes
Weighted binary codes are those binary codes which obey the positional weight principle.
Each position of the number represents a specific weight. 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.
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 (0011)2 or (3)10 to each code word in 8421. The excess-3 codes are obtained as follows
−
Example
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.
Digital Computers
A Digital computer can be considered as a digital system that performs various computational tasks.
The first electronic digital computer was developed in the late 1940s and was used primarily for
numerical computations.
By convention, the digital computers use the binary number system, which has two digits: 0 and 1.
A computer system is subdivided into two functional entities: Hardware and Software.
The hardware consists of all the electronic components and electromechanical devices that comprise
the physical entity of the device.
The software of the computer consists of the instructions and data that the computer manipulates to
perform various data-processing tasks.
o The Central Processing Unit (CPU) contains an arithmetic and logic unit for manipulating data, a
number of registers for storing data, and a control circuit for fetching and executing instructions.
o The memory unit of a digital computer contains storage for instructions and data.
o The Random Access Memory (RAM) for real-time processing of the data.
o The Input-Output devices for generating inputs from the user and displaying the final results to
the user.
o The Input-Output devices connected to the computer include the keyboard, mouse, terminals,
magnetic disk drives, and other communication devices.
Computer Organization and Architecture Tutorial provides in-depth knowledge of internal working,
structuring, and implementation of a computer system.
Whereas, Organization defines the way the system is structured so that all those catalogued tools can be used
properly.
Computer Architecture deals with high-level Computer Organization deals with low-
design issues. level design issues.
• A computer organization describes the functions and design of the various units of a digital system.
• A general-purpose computer system is the best-known example of a digital system. Other examples
include telephone switching exchanges, digital voltmeters, digital counters, electronic calculators and
digital displays.
• Computer architecture deals with the specification of the instruction set and the hardware units that
implement the instructions.
• Computer hardware consists of electronic circuits, displays, magnetic and optic storage media and also
the communication facilities.
• Functional units are a part of a CPU that performs the operations and calculations called for by the
computer program.
• Functional units of a computer system are parts of the CPU (Central Processing Unit) that performs
the operations and calculations called for by the computer program. A computer consists of five main
components namely, Input unit, Central Processing Unit, Memory unit Arithmetic & logical unit,
Control unit and an Output unit.
Input Unit
• Input units are used by the computer to read the data. The most commonly used input devices are
keyboards, mouse, joysticks, trackballs, microphones, etc.
• However, the most well-known input device is a keyboard. Whenever a key is pressed, the
corresponding letter or digit is automatically translated into its corresponding binary code and
transmitted over a cable to either the memory or the processor.
• Central processing unit commonly known as CPU can be referred as an electronic circuitry within a
computer that carries out the instructions given by a computer program by performing the basic
arithmetic, logical, control and input/output (I/O) operations specified by the instructions.
Memory Unit
• The Memory unit can be referred to as the storage area in which programs are kept which are running,
and that contains data needed by the running programs.
• The Memory unit can be categorized in two ways namely, primary memory and secondary memory.
• It enables a processor to access running execution applications and services that are temporarily stored
in a specific memory location.
• Primary storage is the fastest memory that operates at electronic speeds. Primary memory contains a
large number of semiconductor storage cells, capable of storing a bit of information. The word length
of a computer is between 16-64 bits.
• It is also known as the volatile form of memory, means when the computer is shut down, anything
contained in RAM is lost.
• Cache memory is also a kind of memory which is used to fetch the data very soon. They are highly
coupled with the processor.
• The most common examples of primary memory are RAM and ROM.
• Secondary memory is used when a large amount of data and programs have to be stored for a long-
term basis.
• It is also known as the Non-volatile memory form of memory, means the data is stored permanently
irrespective of shut down.
• The most common examples of secondary memory are magnetic disks, magnetic tapes, and optical
disks.
Control unit
• The control unit is a component of a computer's central processing unit that coordinates the operation
of the processor. It tells the computer's memory, arithmetic/logic unit and input and output devices
how to respond to a program's instructions.
• The control unit is also known as the nerve center of a computer system.
• Let's us consider an example of addition of two operands by the instruction given as Add LOCA, RO.
This instruction adds the memory location LOCA to the operand in the register RO and places the sum
in the register RO. This instruction internally performs several steps.
• The primary function of the output unit is to send the processed results to the user. Output devices
display information in a way that the user can understand.
• Output devices are pieces of equipment that are used to generate information or any other response
processed by the computer. These devices display information that has been held or generated within
a computer.
• The most common example of an output device is a monitor.
Digital Computers:
A Digital computer can be considered as a digital system that performs various computational tasks.
The first electronic digital computer was developed in the late 1940s and was used primarily for numerical
computations.
By convention, the digital computers use the binary number system, which has two digits: 0 and 1. A binary
digit is called a bit.
A computer system is subdivided into two functional entities: Hardware and Software.
The hardware consists of all the electronic components and electromechanical devices that comprise the
physical entity of the device.
The software of the computer consists of the instructions and data that the computer manipulates to perform
various data-processing tasks.
• The Central Processing Unit (CPU) contains an arithmetic and logic unit for manipulating data, a
number of registers for storing data, and a control circuit for fetching and executing instructions.
• The memory unit of a digital computer contains storage for instructions and data.
• The Random-Access Memory (RAM) for real-time processing of the data.
CHARAN’S DEGREE COLLEGE
• The Input-Output devices for generating inputs from the user and displaying the final results to the
user.
• The Input-Output devices connected to the computer include the keyboard, mouse, terminals, magnetic
disk drives, and other communication devices.
Logic Gates:
• The logic gates are the main structural part of a digital system.
• Logic Gates are a block of hardware that produces signals of binary 1 or 0 when input logic
requirements are satisfied.
• Each gate has a distinct graphic symbol, and its operation can be described by means of algebraic
expressions.
• The seven basic logic gates include: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
• The relationship between the input-output binary variables for each gate can be represented in tabular
form by a truth table.
• Each gate has one or two binary input variables designated by A and B and one binary output variable
designated by x.
AND Gate:
The AND gate is an electronic circuit which gives a high output only if all its inputs are high. The AND
operation is represented by a dot (.) sign.
OR Gate:
The OR gate is an electronic circuit which gives a high output if one or more of its inputs are high. The
operation performed by an OR gate is represented by a plus (+) sign.
The NOT gate is an electronic circuit which produces an inverted version of the input at its output. It is also
known as an Inverter.
NAND gate:
The NOT-AND (NAND) gate which is equal to an AND gate followed by a NOT gate. The NAND gate gives
a high output if any of the inputs are low. The NAND gate is represented by a AND gate with a small circle
on the output. The small circle represents inversion.
NOR gate:
The NOT-OR (NOR) gate which is equal to an OR gate followed by a NOT gate. The NOR gate gives a low
output if any of the inputs are high. The NOR gate is represented by an OR gate with a small circle on the
output. The small circle represents inversion.
The 'Exclusive-OR' gate is a circuit which will give a high output if one of its inputs is high but not both of
them. The XOR operation is represented by an encircled plus sign.
The 'Exclusive-NOR' gate is a circuit that does the inverse operation to the XOR gate. It will give a low output
if one of its inputs is high but not both of them. The small circle represents inversion.
Canonical Form – In Boolean algebra,Boolean function can be expressed as Canonical Disjunctive Normal
Form known as minterm and some are expressed as Canonical Conjunctive Normal Form known
as maxterm .
In Minterm, we look for the functions where the output results in “1” while in Maxterm we look for function
where the output results in “0”.
Standard Form – A Boolean variable can be expressed in either true form or complemented form. In standard
form Boolean function will contain all the variables in either true form or complemented form while in
canonical number of variables depends on the output of SOP or POS.
A Boolean function can be expressed algebraically from a given truth table by forming a :
• minterm for each combination of the variables that produces a 1 in the function and then taking the AND
of all those terms.
• maxterm for each combination of the variables that produces a 0 in the function and then taking the OR
of all those terms.
Boolean Algebra:
Boolean algebra can be considered as an algebra that deals with binary variables and logic operations. Boolean
algebraic variables are designated by letters such as A, B, x, and y. The basic operations performed are AND,
OR, and complement.
The Boolean algebraic functions are mostly expressed with binary variables, logic operation symbols,
parentheses, and equal sign. For a given value of variables, the Boolean function can be either 1 or 0. For
instance, consider the Boolean function:
F = x + y'z
The logic diagram for the Boolean function F = x + y'z can be represented as:
In this section, we will look at some of the examples of Boolean algebra simplification using Logic gates.
1. F1 = xyz'
2. F2 = x + y'z
Truth tables for F1= xyz', F2= x+y'z, F3= xy'+x'z and F4= x'y'z+x'yz+xy'
x y z F1 F2 F3 F4
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 1 1
1 0 0 0 1 1 1
1 0 1 0 1 1 1
1 1 0 1 1 0 0
De Morgan's Law is also known as De Morgan's theorem, works depending on the concept of Duality. Duality
states that interchanging the operators and variables in a function, such as replacing 0 with 1 and 1 with 0,
AND operator with OR operator and OR operator with AND operator.
De Morgan stated 2 theorems, which will help us in solving the algebraic problems in digital electronics. The
De Morgan's statements are:
1. "The negation of a conjunction is the disjunction of the negations", which means that the complement
of the product of 2 variables is equal to the sum of the compliments of individual variables. For
example, (A.B)' = A' + B'.
2. "The negation of disjunction is the conjunction of the negations", which means that complement of the
sum of two variables is equal to the product of the complement of each variable. For example, (A +
B)' = A'B'.
The logic diagram for the Boolean function AB+A (B+C) + B (B+C) can be represented as:
We will simplify this Boolean function on the basis of rules given by Boolean algebra.
AB + A (B+C) + B (B+C)
NOTE: The Boolean Algebra problems what we solved in the class, and also the problems
what u havesolved will be included.
Map Simplification:
The Map method involves a simple, straightforward procedure for simplifying Boolean expressions.
Map simplification may be regarded as a pictorial arrangement of the truth table which allows an easy
interpretation for choosing the minimum number of terms needed to express the function algebraically. The
map method is also known as Karnaugh map or K-map.
There are four min-terms in a two-variable map. Therefore, the map consists of four squares, one for each
min-term. The 0's and 1's marked for each row, and each column designates the values of variable x and y,
respectively.
There are eight min-terms in a three-variable map. Therefore, the map consists of eight squares.
1. F(x,y,z) = Σ (2,3,4,5)
First, 1 is marked in each min-term that represents the function. Hence, 010, 011, 100, 101 are marked with
1's.
Subsequently, we have to find possible adjacent squares. These are indicated in the map by two rectangles,
each enclosing two 1's.
F= x'y+ xy'
Algebraically verification:
2. F(x,y,z) = Σ(3,4,6,7)
As you can see, there are four squares marked with 1's, one for each min-term of the function.
The other two adjacent squares are combined in the third column to give a two-literal term yz.
The remaining two squares with 1's are shown in the above diagram with their values enclosed in half
rectangles. When these two half rectangles are combined, it yields two literal term xz'.
combinational circuit:
A combinational circuit comprises of logic gates whose outputs at any time are determined directly from the
present combination of inputs without any regard to previous inputs.
The basic components of a combinational circuit are: input variables, logic gates, and output variables.
The 'n' input variables come from an external source whereas the 'm' output variables go to an external
destination. In many applications, the source or destination are storage registers.
The combinational circuit that performs the addition of two bits is called a half adder and the one that performs
the addition of three bits (two significant bits and a previous carry) is a full adder.
Half - Adder
A Half-adder circuit needs two binary inputs and two binary outputs. The input variable shows the augend and
addend bits whereas the output variable produces the sum and carry. We can understand the function of ahalf-
adder by formulating a truth table. The truth table for a half-adder is:
o 'x' and 'y' are the two inputs, and S (Sum) and C (Carry) are the two outputs.
o The Carry output is '0' unless both the inputs are 1.
o 'S' represents the least significant bit of the sum.
CHARAN’S DEGREE COLLEGE
The simplified sum of products (SOP) expressions is:
S = x'y+xy', C = xy
Full - Adder
This circuit needs three binary inputs and two binary outputs. The truth table for a full-adder is:
o Two of the input variable 'x' and 'y', represent the two significant bits to be added.
o The third input variable 'z', represents the carry from the previous lower significant position.
o The outputs are designated by the symbol 'S' for sum and 'C' for carry.
o The eight rows under the input variables designate all possible combinations of 0's, and 1's that these
variables may have.
o The input-output logical relationship of the full-adder circuit may be expressed in two Boolean
functions, one for each output variable.
o Each output Boolean function can be simplified by using a unique map method.
Flip flops are an application of logic gates. A flip-flop circuit can remain in a binary state indefinitely (as long
as power is delivered to the circuit) until directed by an input signal to switch states.
The SET-RESET flip-flop consists of two NOR gates and also two NAND gates.
The design of these flip flops also includes two inputs, called the SET [S] and RESET [R]. There are also two
outputs, Q and Q'.
The operation of a basic flip-flop can be modified by providing an additional control input that determines
when the state of the circuit is to be changed.
The limitation with a S-R flip-flop using NOR and NAND gate is the invalid state. This problem can be
overcome by using a stable SR flip-flop that can change outputs when certain invalid states are met, regardless
of the condition of either the Set or the Reset inputs.
D Flip-Flop
From the above figure, you can see that the D input is connected to the S input and the complement of the D
input is connected to the R input.
When the value of CP is '1' (HIGH), the flip-flop moves to the SET state if it is '0' (LOW), the flip-flop
switches to the CLEAR state.
The main difference is that the intermediate state is more refined and precise than that of an S-R flip-flop.
The characteristics of inputs 'J' and 'K' is same as the 'S' and 'R' inputs of the S-R flip-flop.
When both the inputs J and K have a HIGH state, the flip-flop switches to the complement state, so, for a
value of Q = 1, it switches to Q=0, and for a value of Q = 0, it switches to Q=1.
Both the J and K inputs are connected and are also called as a single input J-K Flip-flop.
Triggering of Flip-Flops
The state of the flip-flop is changed by a momentary change in the input signal. This momentary change is
known as Trigger, and the transition it causes is said to triggering the flip-flop.
A pulse start from the initial value of '0', goes momentarily to '1', and after a short while, returns to its initial
'0' value.
A positive clock source remains at '0' during the interval between pulses and goes to 1 during the occurrence
of a pulse.
The positive transition is defined as a positive edge and the negative transition as a negative edge.
Note: The characteristics table and the Excitation table for all the
flip flops.Refer to notes which I gave in the class.
Integrated Circuit
An integrated circuit is electronic circuit or device that has electronic components on a small
semiconductor chip. It has functionality of logic AND or amplifying of a signal. These are mainly
two types of circuits: Digital or Analog. Analog ICs handle continuous signals such as audio signals
and Digital ICs handle discrete signals such as binary values.
There are two main types of integrated circuits: digital ICs or analog ICs. These types of ICs are
discussed in detail below.
In this type of ICs, the input and output both signals are continuous. The output signal level depends
upon the input signal level and the output signal level is a linear function of input signal level. Linear
ICs or analog ICs are most commonly used as audio frequency amplifier and radio frequency amplifier.
Op amps, voltage regulators, comparators and timers are also well-known examples of linear ICs or
analog ICs.
Digital IC
The logic Gates, such as AND gate, OR gate, NAND gate, XOR gate, flip flops, counters;
microprocessors are some well-known examples of digital ICs. These ICs operate with binary data
such as either 0 or 1. Normally in digital circuit, 0 indicates 0 V and one indicate +5 V. Digital ICs are
commonly used in many electronics projects, and are often available as added components to the top
Arduino starter kits.
The main components of an IC are transistors. These transistors may be bipolar or field effect depending upon
As the technology is improving day by day, the number of transistors incorporated in a single IC chip
is also increasing. Depending upon the number of transistors incorporated in a single chip, the ICs are
categorized in five groups. Namely,
Flip flops can be used to store a single bit of binary data (1or 0). However, in order to store multiple bits
of data, we need multiple flip flops. N flip flops are to be connected in an order to store n bits of data.
A Register is a device which is used to store such information. It is a group of flip flops connected in
series used to store multiple bits of data.
The information stored within these registers can be transferred with the help of shift registers. Shift
Register is a group of flip flops used to store multiple bits of data. The bits stored in such registers can
be made to move within the registers and in/out of the registers by applying clock pulses. An n-bit shift
register can be formed by connecting n flip-flops where each flip flop stores a single bit of data.
The registers which will shift the bits to left are called “Shift left registers”.
The registers which will shift the bits to right are called “Shift right registers”.
The shift register, which allows serial input (one bit after the other through a single data line) and
produces a serial output is known as Serial-In Serial-Out shift register. Since there is only one output,
The above circuit is an example of shift right register, taking the serial data input from the left side of the
flip flop. The main use of a SISO is to act as a delay element.
The shift register, which allows serial input (one bit after the other through a single data line) and
produces a parallel output is known as Serial-In Parallel-Out shift register.
The logic circuit given below shows a serial-in-parallel-out shift register. The circuit consists of four D
flip-flops which are connected. The clear (CLR) signal is connected in addition to the clock signal to all
the 4 flip flops in order to RESET them. The output of the first flip flop is connected to the input of the
next flip flop and so on. All these flip-flops are synchronous with each other since the same clock signal
is applied to each flip flop.
The above circuit is an example of shift right register, taking the serial data input from the left side of the
flip flop and producing a parallel output. They are used in communication lines where demultiplexing of
The shift register, which allows parallel input (data is given separately to each flip flop and in a
simultaneous manner) and produces a serial output is known as Parallel-In Serial-Out shift register.
The logic circuit given below shows a parallel-in-serial-out shift register. The circuit consists of four D
flip-flops which are connected. The clock input is directly connected to all the flip flops but the input
data is connected individually to each flip flop through a multiplexer at the input of every flip flop. The
output of the previous flip flop and parallel data input are connected to the input of the MUX and the
output of MUX is connected to the next flip flop. All these flip-flops are synchronous with each other
since the same clock signal is applied to each flip flop.
A Parallel in Serial out (PISO) shift register us used to convert parallel data to serial data.
The shift register, which allows parallel input (data is given separately to each flip flop and in a
simultaneous manner) and also produces a parallel output is known as Parallel-In parallel-Out shift
register.
The logic circuit given below shows a parallel-in-parallel-out shift register. The circuit consists of four
D flip-flops which are connected. The clear (CLR) signal and clock signals are connected to all the 4 flip
flops. In this type of register, there are no interconnections between the individual flip-flops since no
serial shifting of the data is required. Data is given as input separately for each flip flop and in the same
way, output also collected individually from each flip flop.
If we shift a binary number to the left by one position, it is equivalent to multiplying the number by 2
and if we shift a binary number to the right by one position, it is equivalent to dividing the number by 2.
To perform these operations we need a register which can shift the data in either direction.
Bidirectional shift registers are the registers which are capable of shifting the data either right or left
depending on the mode selected. If the mode selected is 1(high), the data will be shifted towards the right
direction and if the mode selected is 0(low), the data will be shifted towards the left direction.
A multiplexer is a combinational circuit that has 2n input lines and a single output line. Simply, the
multiplexer is a multi-input and single-output combinational circuit. The binary information is received
from the input lines and directed to the output line. On the basis of the values of the selection lines,
one of these data inputs will be connected to the output.
Unlike encoder and decoder, there are n selection lines and 2n input lines. So, there is a total of
2N possible combinations of inputs. A multiplexer is also treated as Mux.
2×1 Multiplexer:
In 2×1 multiplexer, there are only two inputs, i.e., A0 and A1, 1 selection line, i.e., S0 and single outputs,
i.e., Y. On the basis of the combination of inputs which are present at the selection line S0, one of these
2 inputs will be connected to the output. The block diagram and the truth table of the 2×1 multiplexer
are given below.
Truth Table:
Y=S0'.A0+S0.A1
4×1 Multiplexer:
In the 4×1 multiplexer, there is a total of four inputs, i.e., A0, A1, A2, and A3, 2 selection lines, i.e.,
S0 and S1 and single output, i.e., Y. On the basis of the combination of inputs that are present at the
Block Diagram:
Truth Table:
In the 8 to 1 multiplexer, there are total eight inputs, i.e., A0, A1, A2, A3, A4, A5, A6, and A7, 3 selection
lines, i.e., S0, S1and S2 and single output, i.e., Y. On the basis of the combination of inputs that are
present at the selection lines S0, S1, and S2, one of these 8 inputs are connected to the output. The block
diagram and the truth table of the 8×1 multiplexer are given below.
Truth Table:
De-multiplexer
A De-multiplexer is a combinational circuit that has only 1 input line and 2N output lines. Simply, the
multiplexer is a single-input and multi-output combinational circuit. The information is received from
the single input lines and directed to the output line. On the basis of the values of the selection lines,
the input will be connected to one of these outputs. De-multiplexer is opposite to the multiplexer.
Unlike encoder and decoder, there are n selection lines and 2n outputs. So, there is a total of 2n possible
combinations of inputs. De-multiplexer is also treated as De-mux.
In the 1 to 2 De-multiplexer, there are only two outputs, i.e., Y0, and Y1, 1 selection lines, i.e., S0, and
single input, i.e., A. On the basis of the selection value, the input will be connected to one of the
outputs. The block diagram and the truth table of the 1×2 multiplexer are given below.
Block Diagram:
Truth Table:
Y0=S0'.A
Y1=S0.A
In 1 to 4 De-multiplexer, there are total of four outputs, i.e., Y0, Y1, Y2, and Y3, 2 selection lines, i.e.,
S0 and S1 and single input, i.e., A. On the basis of the combination of inputs which are present at the
selection lines S0 and S1, the input be connected to one of the outputs. The block diagram and the truth
table of the 1×4 multiplexer are given below.
Block Diagram:
Truth Table:
Y0=S1' S0' A
y1=S1' S0 A
y2=S1 S0' A
y3=S1 S0 A
1×8 De-multiplexer
In 1 to 8 De-multiplexer, there are total of eight outputs, i.e., Y0, Y1, Y2, Y3, Y4, Y5, Y6, and Y7, 3
selection lines, i.e., S0, S1and S2 and single input, i.e., A. On the basis of the combination of inputs
which are present at the selection lines S0, S1 and S2, the input will be connected to one of these outputs.
The block diagram and the truth table of the 1×8 de-multiplexer are given below.
Truth Table:
Y0=S0'.S1'.S2'.A
Y1=S0.S1'.S2'.A
Y2=S0'.S1.S2'.A
Y3=S0.S1.S2'.A
Y4=S0'.S1'.S2 A
Y5=S0.S1'.S2 A
Y6=S0'.S1.S2 A
Y7=S0.S1.S3.A
1. Encoders –
An encoder is a combinational circuit that converts binary information in the form of a 2 N input
lines into N output lines, which represent N bit code for the input. For simple encoders, it is
assumed that only one input line is active at a time.
As an example, let’s consider Octal to Binary encoder. As shown in the following figure, an octal-
to-binary encoder takes 8 input lines and generates 3 output lines.
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
As seen from the truth table, the output is 000 when D0 is active; 001 when D1 is active; 010 when
D2 is active and so on.
Implementation –
From the truth table, the output line Z is active when the input octal digit is 1, 3, 5 or 7. Similarly,
Y is 1 when input octal digit is 2, 3, 6 or 7 and X is 1 for input octal digits 4, 5, 6 or 7. Hence, the
Boolean functions would be:
X = D4 + D5 + D6 + D7
Y = D2 +D3 + D6 + D7
Z = D1 + D3 + D5 + D7
Hence, the encoder can be realised with OR gates as follows: