Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Digital Electronics Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 32

In computer switching circuits, in which the logical Boolean operation on data

performed are called logic circuits or a circuit for performing the logical
operations. A logic circuit consists of a number of a logic gates. In formal language
a Logic circuits are the basic building blocks of real-world computers.
Basically logic circuits are electric circuit whose output depends upon the input in
a way that can be expressed as a function in symbolic logic. A logic circuit has one
or more binary inputs (capable of assuming either of two states, for example “on”
or “off”) and a single binary output. Logic circuits that are used to perform
particular functions are called as GATE. Hence Logic circuits are normally
composed of gates. A combination of gates makes up a circuit. Basic logic circuits
include the basic logic gates like AND gate, OR gate, and the NOT gate, which
perform the logical functions AND, OR, and NOT.

In logic circuit Boolean constants 0 and 1 do not represent actual number but
instead represent the state of a voltage variable. This state of voltage variable
called the logic level. Some digital circuits can be extremely complex those type
of Logic circuits can be built from any binary electric or electronic devices,
including switches, relays, electron tubes, solid-state diodes, and transistors. The
selection of these electronic devices is depends upon the application and logic
circuit design requirements. They are connected in such a way that the circuit
output is the reset of logic output. These types of logic circuits are called logic
gates. The operation of and logic circuit is summarized in the form of binary
numbers by a truth table. A truth table describes how a logic circuit output on the
logic level present at the circuit inputs.

Modern technology has produced integrated circuits (ICs) or integrated logic


circuits, modules that perform complex logical functions. A major use of logic
circuits is in electronic digital computers. Similarly in fluid logic circuits have been
developed whose function depends on the flow of a liquid or gas rather than on an
electric current flow in the circuit.

Types of logic circuits:


Logic circuit for digital system is categorized into two main categories;

 Computational logic circuit


 Sequential logic circuit

Computational logic circuits:


Computational logic circuits consist of logic gates whose outputs at any time are
determined directly from the present combination of inputs without regard to
previous output.

Sequential logic circuits:


Sequential circuits employ memory elements i.e. binary cells in addition to logic
gates. The outputs of sequential circuits are a function of the inputs and the state of
the memory elements. The state of memory elements, in turn, is a function of
previous outputs.

Logic Representation:
As we know that logic circuits are normally composed of ‘gates’. It is that the logic
gates produce pulses of electrical current (1s and 0s). Below we are explaining
about the logic representation techniques that help you to express the working of a
logic circuit. There are three common ways in which to represent the working of a
logic circuit.

1. Truth Tables
2. Logic Circuit Diagram
3. Boolean Expression

We will discuss each herein and demonstrate ways to convert between them.

Truth Tables:
A truth table is a chart of Boolean values (1s and 0s) arranged to indicate the
results (or outputs) of all possible inputs combinations. The lists of all possible
inputs combination are arranged in columns on the left and the resultant outputs are
listed in columns on the right side of the table. If there are n inputs then there are
maximum 2n (2 to the power n) possible states or unique combination of inputs.
For example with three inputs there are 23=8 possible combination of inputs.

Inputs Outputs

A B C Y

0 0 0 0

0 0 1 0
0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 1

Logic Circuit Diagram:


A logic circuit diagram uses the graphical representation or description of logic
gates in combination to represent a logic expression. An example of logic circuit
diagram, shows below with three inputs (A, B, and C) and one output (Y). The
interpretation of this will become clear in the following sections.

Logic circuit
diagram

Boolean Expression:
Boolean algebra can be used to write a logic expression in the form of an equation.
There are a few symbols and operators that are uses to express the output of a logic
circuit.

‘+’ means OR, So P+Q is same as P OR Q


‘*’ means AND, So P*Q is same as P AND Q
A ̅ means NOT A, Sometimes it is called complement of A
⨁ means XOR, So P ⨁ Q means P XOR Q
Application of Logic circuits:
In modern technology logic circuits are found in several high-tech devices
including arithmetic logic units, computer memory and registers, multiplexers and
decoder/encoder. Logic circuits are also used in upgraded technical
microprocessors, some of which can contain over 100 million gates. Also, logic
gates are the building blocks of digital electronics and are formed by the
combination of transistors in order to realize some digital operations. Every digital
product, including personal computers, mobile phones, tablets, calculators and
digital watches also uses logic gates.

Advantages of Logic circuits:


Logic circuits perform logical operations on the behalf of Boolean logics. Logic
circuits are primarily implemented electronically using semiconductor diodes or
transistors, but it can be constructed using different basic logic gates which are
implemented by electromagnetic relays, fluidics, molecules, optics or even
mechanical elements.

In real world technology are highly uses various types of logic circuits to solve the
complex real time problems. There are different types of advantages those are
provides an positive edge for using logic gates. Various advantages of logic
circuits are as follows;

Logic circuits have the ability to rectify noise on the input that results in the signal
not correctly switching from 0V to 5V for 0 and 1 respectively. This is an ability
that desired in Logic circuits, and why they are commonly used throughout the
industry.

Since basic logics gates like AND, OR, NOT, TTL etc. are no more expensive so
the use of logic gates is less expensive in design and use.

Logic circuits are more precise representation of a signal can be obtained by using
more binary digits to represent it.

Modern technology uses logic circuits to be control the operation. The operations
of logic circuits are controlled by software, so new functions to be added without
changing hardware.

The switching time is much faster than analog circuits.


Disadvantages of Logic circuits:
As logic circuits are the best utilities devices in the modern technology, but there
have some disadvantages are as follows;

Logic circuits uses more energy than other circuits like analog circuits to
accomplish the same tasks resultant circuit produces more heat. This can be limit
use of logic circuits.

For activation, logic circuits require power system i.e. portable or battery power
systems which are limited in power.

NUMBER SYSTEM
If base or radix of a number system is ‘r’, then the numbers present in that number
system are ranging from zero to r-1. The total numbers present in that number system
is ‘r’. So, we will get various number systems, by choosing the values of radix as
greater than or equal to two.
In this chapter, let us discuss about the popular number systems and how to
represent a number in the respective number system. The following number systems
are the most commonly used.

 Decimal Number system


 Binary Number system
 Octal Number system
 Hexadecimal Number system

Decimal Number System


The base or radix of Decimal number system is 10. So, the numbers ranging from 0 to
9 are used in this number system. The part of the number that lies to the left of
the decimal point is known as integer part. Similarly, the part of the number that lies to
the right of the decimal point is known as fractional part.
In this number system, the successive positions to the left of the decimal point having
weights of 100, 101, 102, 103 and so on. Similarly, the successive positions to the right
of the decimal point having weights of 10-1, 10-2, 10-3 and so on. That means, each
position has specific weight, which is power of base 10

Example
Consider the decimal number 1358.246. Integer part of this number is 1358 and
fractional part of this number is 0.246. The digits 8, 5, 3 and 1 have weights of 100,
101, 102 and 103 respectively. Similarly, the digits 2, 4 and 6 have weights of 10 -1, 10-
2 and 10-3 respectively.

Mathematically, we can write it as


1358.246 = (1 × 103) + (3 × 102) + (5 × 101) + (8 × 100) + (2 × 10-1) +
(4 × 10-2) + (6 × 10-3)
After simplifying the right hand side terms, we will get the decimal number, which is on
left hand side.

Binary Number System


All digital circuits and systems use this binary number system. The base or radix of this
number system is 2. So, the numbers 0 and 1 are used in this number system.
The part of the number, which lies to the left of the binary point is known as integer
part. Similarly, the part of the number, which lies to the right of the binary point is
known as fractional part.
In this number system, the successive positions to the left of the binary point having
weights of 20, 21, 22, 23 and so on. Similarly, the successive positions to the right of the
binary point having weights of 2-1, 2-2, 2-3 and so on. That means, each position has
specific weight, which is power of base 2.

Example
Consider the binary number 1101.011. Integer part of this number is 1101 and
fractional part of this number is 0.011. The digits 1, 0, 1 and 1 of integer part have
weights of 20, 21, 22, 23 respectively. Similarly, the digits 0, 1 and 1 of fractional part
have weights of 2-1, 2-2, 2-3 respectively.
Mathematically, we can write it as
1101.011 = (1 × 23) + (1 × 22) + (0 × 21) + (1 × 20) + (0 × 2-1) +
(1 × 2-2) + (1 × 2-3)
After simplifying the right hand side terms, we will get a decimal number, which is an
equivalent of binary number on left hand side.

Octal Number System


The base or radix of octal number system is 8. So, the numbers ranging from 0 to 7
are used in this number system. The part of the number that lies to the left of the octal
point is known as integer part. Similarly, the part of the number that lies to the right of
the octal point is known as fractional part.
In this number system, the successive positions to the left of the octal point having
weights of 80, 81, 82, 83 and so on. Similarly, the successive positions to the right of the
octal point having weights of 8-1, 8-2, 8-3 and so on. That means, each position has
specific weight, which is power of base 8.
Example
Consider the octal number 1457.236. Integer part of this number is 1457 and
fractional part of this number is 0.236. The digits 7, 5, 4 and 1 have weights of 8 0, 81,
82 and 83 respectively. Similarly, the digits 2, 3 and 6 have weights of 8 -1, 8-2, 8-
3 respectively.

Mathematically, we can write it as


1457.236 = (1 × 83) + (4 × 82) + (5 × 81) + (7 × 80) + (2 × 8-1) +
(3 × 8-2) + (6 × 8-3)
After simplifying the right hand side terms, we will get a decimal number, which is an
equivalent of octal number on left hand side.

Hexadecimal Number System


The base or radix of Hexa-decimal number system is 16. So, the numbers ranging
from 0 to 9 and the letters from A to F are used in this number system. The decimal
equivalent of Hexa-decimal digits from A to F are 10 to 15.
The part of the number, which lies to the left of the hexadecimal point is known as
integer part. Similarly, the part of the number, which lies to the right of the Hexa-
decimal point is known as fractional part.
In this number system, the successive positions to the left of the Hexa-decimal point
having weights of 160, 161, 162, 163 and so on. Similarly, the successive positions to
the right of the Hexa-decimal point having weights of 16-1, 16-2, 16-3 and so on. That
means, each position has specific weight, which is power of base 16.

Example
Consider the Hexa-decimal number 1A05.2C4. Integer part of this number is 1A05
and fractional part of this number is 0.2C4. The digits 5, 0, A and 1 have weights of
160, 161, 162 and 163 respectively. Similarly, the digits 2, C and 4 have weights of 16 -1,
16-2 and 16-3 respectively.
Mathematically, we can write it as
1A05.2C4 = (1 × 163) + (10 × 162) + (0 × 161) + (5 × 160) + (2 × 16-1) +
(12 × 16-2) + (4 × 16-3)
After simplifying the right hand side terms, we will get a decimal number, which is an
equivalent of Hexa-decimal number on left hand side.
In previous chapter, we have seen the four prominent number systems. In this chapter,
let us convert the numbers from one number system to the other in order to find the
equivalent value.
Decimal Number to other Bases Conversion
If the decimal number contains both integer part and fractional part, then convert both
the parts of decimal number into other base individually. Follow these steps for
converting the decimal number into its equivalent number of any base ‘r’.
 Do division of integer part of decimal number and successive quotients with base ‘r’
and note down the remainders till the quotient is zero. Consider the remainders in
reverse order to get the integer part of equivalent number of base ‘r’. That means, first
and last remainders denote the least significant digit and most significant digit
respectively.
 Do multiplication of fractional part of decimal number and successive fractions with
base ‘r’ and note down the carry till the result is zero or the desired number of
equivalent digits is obtained. Consider the normal sequence of carry in order to get the
fractional part of equivalent number of base ‘r’.

Decimal to Binary Conversion


The following two types of operations take place, while converting decimal number into its
equivalent binary number.

 Division of integer part and successive quotients with base 2.


 Multiplication of fractional part and successive fractions with base 2.
Example
Consider the decimal number 58.25. Here, the integer part is 58 and fractional part is
0.25.
Step 1 − Division of 58 and successive quotients with base 2.

Operation Quotient Remainder

58/2 29 0 (LSB)

29/2 14 1

14/2 7 0

7/2 3 1

3/2 1 1
1/2 0 1(MSB)

⇒(58)10 = (111010)2
Therefore, the integer part of equivalent binary number is 111010.
Step 2 − Multiplication of 0.25 and successive fractions with base 2.

Operation Result Carry

0.25 x 2 0.5 0

0.5 x 2 1.0 1

- 0.0 -

⇒ (.25)10 = (.01)2
Therefore, the fractional part of equivalent binary number is .01
⇒ (58.25) = (111010.01)
10 2

Therefore, the binary equivalent of decimal number 58.25 is 111010.01.

Decimal to Octal Conversion


The following two types of operations take place, while converting decimal number into its
equivalent octal number.
 Division of integer part and successive quotients with base 8.
 Multiplication of fractional part and successive fractions with base 8.
Example
Consider the decimal number 58.25. Here, the integer part is 58 and fractional part is
0.25.
Step 1 − Division of 58 and successive quotients with base 8.

Operation Quotient Remainder

58/8 7 2

7/8 0 7
⇒(58)10 = (72)8
Therefore, the integer part of equivalent octal number is 72.
Step 2 − Multiplication of 0.25 and successive fractions with base 8.

Operation Result Carry

0.25 x 8 2.00 2

- 0.00 -

⇒ (.25)10 = (.2)8
Therefore, the fractional part of equivalent octal number is .2
⇒ (58.25) = (72.2)
10 8

Therefore, the octal equivalent of decimal number 58.25 is 72.2.

Decimal to Hexa-Decimal Conversion


The following two types of operations take place, while converting decimal number into
its equivalent hexa-decimal number.

 Division of integer part and successive quotients with base 16.


 Multiplication of fractional part and successive fractions with base 16.
Example
Consider the decimal number 58.25. Here, the integer part is 58 and decimal part is
0.25.
Step 1 − Division of 58 and successive quotients with base 16.

Operation Quotient Remainder

58/16 3 10=A

3/16 0 3

⇒ (58)10 = (3A) 16
Therefore, the integer part of equivalent Hexa-decimal number is 3A.
Step 2 − Multiplication of 0.25 and successive fractions with base 16.
Operation Result Carry

0.25 x 16 4.00 4

- 0.00 -

⇒(.25)10 = (.4)16
Therefore, the fractional part of equivalent Hexa-decimal number is .4.
⇒(58.25) = (3A.4)
10 16

Therefore, the Hexa-decimal equivalent of decimal number 58.25 is 3A.4.

Binary Number to other Bases Conversion


The process of converting a number from binary to decimal is different to the process
of converting a binary number to other bases. Now, let us discuss about the conversion
of a binary number to decimal, octal and Hexa-decimal number systems one by one.

Binary to Decimal Conversion


For converting a binary number into its equivalent decimal number, first multiply the
bits of binary number with the respective positional weights and then add all those
products.
Example
Consider the binary number 1101.11.
Mathematically, we can write it as
(1101.11) = (1 × 2 ) + (1 × 2 ) + (0 × 2 ) + (1 × 2 ) + (1 × 2 ) +
2
3 2 1 0 -1

(1 × 2 )
-2

⇒ (1101.11) = 8 + 4 + 0 + 1 + 0.5 + 0.25 = 13.75


2

⇒ (1101.11) = (13.75)
2 10

Therefore, the decimal equivalent of binary number 1101.11 is 13.75.

Binary to Octal Conversion


We know that the bases of binary and octal number systems are 2 and 8 respectively.
Three bits of binary number is equivalent to one octal digit, since 2 = 8.
3

Follow these two steps for converting a binary number into its equivalent octal number.
 Start from the binary point and make the groups of 3 bits on both sides of binary point. If
one or two bits are less while making the group of 3 bits, then include required number
of zeros on extreme sides.
 Write the octal digits corresponding to each group of 3 bits.
Example
Consider the binary number 101110.01101.
Step 1 − Make the groups of 3 bits on both sides of binary point.
101 110.011 01
Here, on right side of binary point, the last group is having only 2 bits. So, include one
zero on extreme side in order to make it as group of 3 bits.
⇒ 101 110.011 010
Step 2 − Write the octal digits corresponding to each group of 3 bits.
⇒ (101 110.011 010) = (56.32)
2 8

Therefore, the octal equivalent of binary number 101110.01101 is 56.32.

Binary to Hexa-Decimal Conversion


We know that the bases of binary and Hexa-decimal number systems are 2 and 16
respectively. Four bits of binary number is equivalent to one Hexa-decimal digit, since
2 = 16.
4

Follow these two steps for converting a binary number into its equivalent Hexa-decimal
number.
 Start from the binary point and make the groups of 4 bits on both sides of binary point. If
some bits are less while making the group of 4 bits, then include required number of
zeros on extreme sides.
 Write the Hexa-decimal digits corresponding to each group of 4 bits.
Example
Consider the binary number 101110.01101
Step 1 − Make the groups of 4 bits on both sides of binary point.
10 1110.0110 1
Here, the first group is having only 2 bits. So, include two zeros on extreme side in
order to make it as group of 4 bits. Similarly, include three zeros on extreme side in
order to make the last group also as group of 4 bits.
⇒ 0010 1110.0110 1000
Step 2 − Write the Hexa-decimal digits corresponding to each group of 4 bits.
⇒ (0010 1110.0110 1000) = (2E.68)
2 16
Therefore, the Hexa-decimal equivalent of binary number 101110.01101 is (2E.68).

Octal Number to other Bases Conversion


The process of converting a number from octal to decimal is different to the process of
converting an octal number to other bases. Now, let us discuss about the conversion of
an octal number to decimal, binary and Hexa-decimal number systems one by one.

Octal to Decimal Conversion


For converting an octal number into its equivalent decimal number, first multiply the
digits of octal number with the respective positional weights and then add all those
products.
Example
Consider the octal number 145.23.
Mathematically, we can write it as
(145.23) = (1 × 8 ) + (4 × 8 ) + (5 × 8 ) + (2 × 8 ) + (3 × 8 )
8
2 1 0 -1 -2

⇒ (145.23) = 64 + 32 + 5 + 0.25 + 0.05 = 101.3


8

⇒ (145.23) = (101.3)
8 10

Therefore, the decimal equivalent of octal number 145.23 is 101.3.

Octal to Binary Conversion


The process of converting an octal number to an equivalent binary number is just
opposite to that of binary to octal conversion. By representing each octal digit with 3
bits, we will get the equivalent binary number.
Example
Consider the octal number 145.23.
Represent each octal digit with 3 bits.
(145.23) = (001 100 101.010 011)
8 2

The value doesn’t change by removing the zeros, which are on the extreme side.
⇒ (145.23) = (1100101.010011)
8 2

Therefore, the binary equivalent of octal number 145.23 is 1100101.010011.

Octal to Hexa-Decimal Conversion


Follow these two steps for converting an octal number into its equivalent Hexa-decimal
number.

 Convert octal number into its equivalent binary number.


 Convert the above binary number into its equivalent Hexa-decimal number.
Example
Consider the octal number 145.23
In previous example, we got the binary equivalent of octal number 145.23 as
1100101.010011.
By following the procedure of binary to Hexa-decimal conversion, we will get
(1100101.010011) = (65.4C)16
2

⇒(145.23) = (65.4C)
8 16

Therefore, the Hexa-decimal equivalent of octal number 145.23 is 65.4C.

Hexa-Decimal Number to other Bases Conversion


The process of converting a number from Hexa-decimal to decimal is different to the
process of converting Hexa-decimal number into other bases. Now, let us discuss
about the conversion of Hexa-decimal number to decimal, binary and octal number
systems one by one.

Hexa-Decimal to Decimal Conversion


For converting Hexa-decimal number into its equivalent decimal number, first multiply
the digits of Hexa-decimal number with the respective positional weights and then add
all those products.
Example
Consider the Hexa-decimal number 1A5.2
Mathematically, we can write it as
(1A5.2) = (1 × 16 ) + (10 × 16 ) + (5 × 16 ) + (2 × 16 )
16
2 1 0 -1

⇒ (1A5.2) = 256 + 160 + 5 + 0.125 = 421.125


16

⇒ (1A5.2) = (421.125)
16 10

Therefore, the decimal equivalent of Hexa-decimal number 1A5.2 is 421.125.

Hexa-Decimal to Binary Conversion


The process of converting Hexa-decimal number into its equivalent binary number is
just opposite to that of binary to Hexa-decimal conversion. By representing each Hexa-
decimal digit with 4 bits, we will get the equivalent binary number.
Example
Consider the Hexa-decimal number 65.4C
Represent each Hexa-decimal digit with 4 bits.
(65.4C) = (0110 0101.0100 1100)
6 2

The value doesn’t change by removing the zeros, which are at two extreme sides.
⇒ (65.4C) = (1100101.010011)
16 2

Therefore, the binary equivalent of Hexa-decimal number 65.4C is 1100101.010011.

Hexa-Decimal to Octal Conversion


Follow these two steps for converting Hexa-decimal number into its equivalent octal
number.

 Convert Hexa-decimal number into its equivalent binary number.


 Convert the above binary number into its equivalent octal number.
Example
Consider the Hexa-decimal number 65.4C
In previous example, we got the binary equivalent of Hexa-decimal number 65.4C as
1100101.010011.
By following the procedure of binary to octal conversion, we will get
(1100101.010011) = (145.23)
2 8

⇒(65.4C) = (145.23)
16 𝟖

Therefore, the octal equivalent of Hexa-decimal number 65.4C is 145.23.


We can make the binary numbers into the following two groups − Unsigned
numbers and Signed numbers.

Unsigned Numbers
Unsigned numbers contain only magnitude of the number. They don’t have any sign.
That means all unsigned binary numbers are positive. As in decimal number system,
the placing of positive sign in front of the number is optional for representing positive
numbers. Therefore, all positive numbers including zero can be treated as unsigned
numbers if positive sign is not assigned in front of the number.

Signed Numbers
Signed numbers contain both sign and magnitude of the number. Generally, the sign is
placed in front of number. So, we have to consider the positive sign for positive
numbers and negative sign for negative numbers. Therefore, all numbers can be
treated as signed numbers if the corresponding sign is assigned in front of the number.
If sign bit is zero, which indicates the binary number is positive. Similarly, if sign bit is
one, which indicates the binary number is negative.

Representation of Un-Signed Binary Numbers


The bits present in the un-signed binary number holds the magnitude of a number.
That means, if the un-signed binary number contains ‘N’ bits, then all N bits represent
the magnitude of the number, since it doesn’t have any sign bit.
Example
Consider the decimal number 108. The binary equivalent of this number is 1101100.
This is the representation of unsigned binary number.
(108) = (1101100)
10 2

It is having 7 bits. These 7 bits represent the magnitude of the number 108.

Representation of Signed Binary Numbers


The Most Significant Bit (MSB) of signed binary numbers is used to indicate the sign of
the numbers. Hence, it is also called as sign bit. The positive sign is represented by
placing ‘0’ in the sign bit. Similarly, the negative sign is represented by placing ‘1’ in the
sign bit.
If the signed binary number contains ‘N’ bits, then (N-1) bits only represent the
magnitude of the number since one bit (MSB) is reserved for representing sign of the
number.
There are three types of representations for signed binary numbers

 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.
Example
Consider the positive decimal number +108. The binary equivalent of magnitude of
this number is 1101100. These 7 bits represent the magnitude of the number 108.
Since it is positive number, consider the sign bit as zero, which is placed on left most
side of magnitude.
(+108) = (01101100)
10 2

Therefore, the signed binary representation of positive decimal number +108 is


𝟎𝟏𝟏𝟎𝟏𝟏𝟎𝟎. So, the same representation is valid in sign-magnitude form, 1’s
complement form and 2’s complement form for positive decimal number +108.

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) = (11101100)
10 2

Therefore, the sign-magnitude representation of -108 is 11101100.

1’s complement form


The 1’s complement of a number is obtained by complementing all the bits of signed
binary number. So, 1’s complement of positive number gives a negative number.
Similarly, 1’s complement of negative number gives a positive number.
That means, if you perform two times 1’s complement of a binary number including
sign bit, then you will get the original signed binary number.
Example
Consider the negative decimal number -108. The magnitude of this number is 108.
We know the signed binary representation of 108 is 01101100.
It is having 8 bits. The MSB of this number is zero, which indicates positive number.
Complement of zero is one and vice-versa. So, replace zeros by ones and ones by
zeros in order to get the negative number.
(−108) = (10010011)
10 2

Therefore, the 1’s complement of (108) is (10010011) .


10 2

2’s complement form


The 2’s complement of a binary number is obtained by adding one to the 1’s
complement of signed binary number. So, 2’s complement of positive number gives a
negative number. Similarly, 2’s complement of negative number gives a positive
number.
That means, if you perform two times 2’s complement of a binary number including
sign bit, then you will get the original signed binary number.
Example
Consider the negative decimal number -108.
We know the 1’s complement of (108) is (10010011)
10 2

2’s compliment of (108) = 1’s compliment of (108) + 1.


10 10

= 10010011 + 1
= 10010100
Therefore, the 2’s complement of (108) is (10010100) .
10 2
In this chapter, let us discuss about the basic arithmetic operations, which can be
performed on any two signed binary numbers using 2’s complement method.
The basic arithmetic operations are addition and subtraction.

Addition of two Signed Binary Numbers


Consider the two signed binary numbers A & B, which are represented in 2’s
complement form. We can perform the addition of these two numbers, which is similar
to the addition of two unsigned binary numbers. But, if the resultant sum contains carry
out from sign bit, then discard (ignore) it in order to get the correct value.
If resultant sum is positive, you can find the magnitude of it directly. But, if the resultant
sum is negative, then take 2’s complement of it in order to get the magnitude.

Example 1
Let us perform the addition of two decimal numbers +7 and +4 using 2’s complement
method.
The 2’s complement representations of +7 and +4 with 5 bits each are shown below.
(+7) = (00111) 10 2

(+4) = (00100) 10 2

The addition of these two numbers is


(+7) +(+4) = (00111) +(00100)
10 10 2 2

⇒(+7) +(+4) = (01011) .


10 10 2

The resultant sum contains 5 bits. So, there is no carry out from sign bit. The sign bit ‘0’
indicates that the resultant sum is positive. So, the magnitude of sum is 11 in decimal
number system. Therefore, addition of two positive numbers will give another positive
number.

Example 2
Let us perform the addition of two decimal numbers -7 and -4 using 2’s complement
method.
The 2’s complement representation of -7 and -4 with 5 bits each are shown below.
(−7) = (11001) 10 2

(−4) = (11100) 10 2

The addition of these two numbers is


(−7) + (−4) = (11001) + (11100)
10 10 2 2

⇒(−7) + (−4) = (110101) .


10 10 2

The resultant sum contains 6 bits. In this case, carry is obtained from sign bit. So, we
can remove it
Resultant sum after removing carry is (−7) + (−4) = (10101) .
10 10 2

The sign bit ‘1’ indicates that the resultant sum is negative. So, by taking 2’s
complement of it we will get the magnitude of resultant sum as 11 in decimal number
system. Therefore, addition of two negative numbers will give another negative
number.

Subtraction of two Signed Binary Numbers


Consider the two signed binary numbers A & B, which are represented in 2’s
complement form. We know that 2’s complement of positive number gives a negative
number. So, whenever we have to subtract a number B from number A, then take 2’s
complement of B and add it to A. So, mathematically we can write it as
A - B = A + (2's complement of B)
Similarly, if we have to subtract the number A from number B, then take 2’s
complement of A and add it to B. So, mathematically we can write it as
B - A = B + (2's complement of A)
So, the subtraction of two signed binary numbers is similar to the addition of two signed
binary numbers. But, we have to take 2’s complement of the number, which is
supposed to be subtracted. This is the advantage of 2’s complement technique.
Follow, the same rules of addition of two signed binary numbers.

Example 3
Let us perform the subtraction of two decimal numbers +7 and +4 using 2’s
complement method.
The subtraction of these two numbers is
(+7) − (+4) = (+7) + (−4) .
10 10 10 10

The 2’s complement representation of +7 and -4 with 5 bits each are shown below.
(+7) = (00111)
10 2

(+4) = (11100)
10 2

⇒(+7) + (+4) = (00111) + (11100) = (00011)


10 10 2 2 2

Here, the carry obtained from sign bit. So, we can remove it. The resultant sum after
removing carry is
(+7) + (+4) = (00011)
10 10 2

The sign bit ‘0’ indicates that the resultant sum is positive. So, the magnitude of it is 3
in decimal number system. Therefore, subtraction of two decimal numbers +7 and +4 is
+3.

Example 4
Let us perform the subtraction of two decimal numbers +4 and +7 using 2’s
complement method.
The subtraction of these two numbers is
(+4) − (+7) = (+4) + (−7) .
10 10 10 10

The 2’s complement representation of +4 and -7 with 5 bits each are shown below.
(+4) = (00100)
10 2

(-7) = (11001)
10 2

⇒(+4) + (-7) = (00100) + (11001) = (11101)


10 10 2 2 2

Here, carry is not obtained from sign bit. The sign bit ‘1’ indicates that the resultant sum
is negative. So, by taking 2’s complement of it we will get the magnitude of resultant
sum as 3 in decimal number system. Therefore, subtraction of two decimal numbers +4
and +7 is -3.
In the coding, when numbers or letters are represented by a specific group of symbols,
it is said to be that number or letter is being encoded. The group of symbols is called
as code. The digital data is represented, stored and transmitted as group of bits. This
group of bits is also called as binary code.
Binary codes can be classified into two types.

 Weighted codes
 Unweighted codes

If the code has positional weights, then it is said to be weighted code. Otherwise, it is
an unweighted code. Weighted codes can be further classified as positively weighted
codes and negatively weighted codes.

Binary Codes for Decimal digits


The following table shows the various binary codes for decimal digits 0 to 9.
Decimal Digit 8421 Code 2421 Code 84-2-1 Code Excess 3 Code

0 0000 0000 0000 0011

1 0001 0001 0111 0100

2 0010 0010 0110 0101

3 0011 0011 0101 0110

4 0100 0100 0100 0111


5 0101 1011 1011 1000

6 0110 1100 1010 1001

7 0111 1101 1001 1010

8 1000 1110 1000 1011

9 1001 1111 1111 1100

We have 10 digits in decimal number system. To represent these 10 digits in binary,


we require minimum of 4 bits. But, with 4 bits there will be 16 unique combinations of
zeros and ones. Since, we have only 10 decimal digits, the other 6 combinations of
zeros and ones are not required.

8 4 2 1 code
 The weights of this code are 8, 4, 2 and 1.

 This code has all positive weights. So, it is a positively weighted code.

 This code is also called as natural BCD (Binary Coded Decimal) code.

Example
Let us find the BCD equivalent of the decimal number 786. This number has 3 decimal
digits 7, 8 and 6. From the table, we can write the BCD (8421) codes of 7, 8 and 6 are
0111, 1000 and 0110 respectively.
∴ (786) = (011110000110)
10 BCD

There are 12 bits in BCD representation, since each BCD code of decimal digit has 4
bits.

2 4 2 1 code
 The weights of this code are 2, 4, 2 and 1.

 This code has all positive weights. So, it is a positively weighted code.

 It is an unnatural BCD code. Sum of weights of unnatural BCD codes is equal to 9.

 It is a self-complementing code. Self-complementing codes provide the 9’s complement of a decimal number, just by
interchanging 1’s and 0’s in its equivalent 2421 representation.

Example
Let us find the 2421 equivalent of the decimal number 786. This number has 3 decimal
digits 7, 8 and 6. From the table, we can write the 2421 codes of 7, 8 and 6 are 1101,
1110 and 1100 respectively.
Therefore, the 2421 equivalent of the decimal number 786 is 110111101100.
8 4 -2 -1 code
 The weights of this code are 8, 4, -2 and -1.

 This code has negative weights along with positive weights. So, it is a negatively weighted code.

 It is an unnatural BCD code.

 It is a self-complementing code.

Example
Let us find the 8 4-2-1 equivalent of the decimal number 786. This number has 3
decimal digits 7, 8 and 6. From the table, we can write the 8 4 -2 -1 codes of 7, 8 and 6
are 1001, 1000 and 1010 respectively.
Therefore, the 8 4 -2 -1 equivalent of the decimal number 786 is 100110001010.

Excess 3 code
 This code doesn’t have any weights. So, it is an un-weighted code.

 We will get the Excess 3 code of a decimal number by adding three (0011) to the binary equivalent of that decimal
number. Hence, it is called as Excess 3 code.

 It is a self-complementing code.

Example
Let us find the Excess 3 equivalent of the decimal number 786. This number has 3
decimal digits 7, 8 and 6. From the table, we can write the Excess 3 codes of 7, 8 and
6 are 1010, 1011 and 1001 respectively.
Therefore, the Excess 3 equivalent of the decimal number 786 is 101010111001

Gray Code
The following table shows the 4-bit Gray codes corresponding to each 4-bit binary
code.
Decimal Number Binary Code Gray Code

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110
5 0101 0111

6 0110 0101

7 0111 0100

8 1000 1100

9 1001 1101

10 1010 1111

11 1011 1110

12 1100 1010

13 1101 1011

14 1110 1001

15 1111 1000

 This code doesn’t have any weights. So, it is an un-weighted code.

 In the above table, the successive Gray codes are differed in one bit position only. Hence, this code is called as unit
distance code.

Binary code to Gray Code Conversion


Follow these steps for converting a binary code into its equivalent Gray code.
 Consider the given binary code and place a zero to the left of MSB.

 Compare the successive two bits starting from zero. If the 2 bits are same, then the output is zero. Otherwise, output is
one.

 Repeat the above step till the LSB of Gray code is obtained.

Example
From the table, we know that the Gray code corresponding to binary code 1000 is
1100. Now, let us verify it by using the above procedure.
Given, binary code is 1000.
Step 1 − By placing zero to the left of MSB, the binary code will be 01000.
Step 2 − By comparing successive two bits of new binary code, we will get the gray
code as 1100.
We know that the bits 0 and 1 corresponding to two different range of analog voltages.
So, during transmission of binary data from one system to the other, the noise may
also be added. Due to this, there may be errors in the received data at other system.
That means a bit 0 may change to 1 or a bit 1 may change to 0. We can’t avoid the
interference of noise. But, we can get back the original data first by detecting whether
any error(s) present and then correcting those errors. For this purpose, we can use the
following codes.

 Error detection codes


 Error correction codes

Error detection codes − are used to detect the error(s) present in the received data
(bit stream). These codes contain some bit(s), which are included (appended) to the
original bit stream. These codes detect the error, if it is occurred during transmission of
the original data (bit stream).Example − Parity code, Hamming code.
Error correction codes − are used to correct the error(s) present in the received data
(bit stream) so that, we will get the original data. Error correction codes also use the
similar strategy of error detection codes.Example − Hamming code.
Therefore, to detect and correct the errors, additional bit(s) are appended to the data
bits at the time of transmission.

Parity Code
It is easy to include (append) one parity bit either to the left of MSB or to the right of
LSB of original bit stream. There are two types of parity codes, namely even parity
code and odd parity code based on the type of parity being chosen.

Even Parity Code


The value of even parity bit should be zero, if even number of ones present in the
binary code. Otherwise, it should be one. So that, even number of ones present
in even parity code. Even parity code contains the data bits and even parity bit.
The following table shows the even parity codes corresponding to each 3-bit binary
code. Here, the even parity bit is included to the right of LSB of binary code.
Binary Code Even Parity bit Even Parity Code

000 0 0000

001 1 0011

010 1 0101

011 0 0110
100 1 1001

101 0 1010

110 0 1100

111 1 1111

Here, the number of bits present in the even parity codes is 4. So, the possible even
number of ones in these even parity codes are 0, 2 & 4.
 If the other system receives one of these even parity codes, then there is no error in the received data. The bits other
than even parity bit are same as that of binary code.

 If the other system receives other than even parity codes, then there will be an error(s) in the received data. In this case,
we can’t predict the original binary code because we don’t know the bit position(s) of error.

Therefore, even parity bit is useful only for detection of error in the received parity
code. But, it is not sufficient to correct the error.

Odd Parity Code


The value of odd parity bit should be zero, if odd number of ones present in the binary
code. Otherwise, it should be one. So that, odd number of ones present in odd parity
code. Odd parity code contains the data bits and odd parity bit.
The following table shows the odd parity codes corresponding to each 3-bit binary
code. Here, the odd parity bit is included to the right of LSB of binary code.
Binary Code Odd Parity bit Odd Parity Code

000 1 0001

001 0 0010

010 0 0100

011 1 0111

100 0 1000

101 1 1011

110 1 1101

111 0 1110
Here, the number of bits present in the odd parity codes is 4. So, the possible odd
number of ones in these odd parity codes are 1 & 3.
 If the other system receives one of these odd parity codes, then there is no error in the received data. The bits other than
odd parity bit are same as that of binary code.

 If the other system receives other than odd parity codes, then there is an error(s) in the received data. In this case, we
can’t predict the original binary code because we don’t know the bit position(s) of error.

Therefore, odd parity bit is useful only for detection of error in the received parity code.
But, it is not sufficient to correct the error.

Hamming Code
Hamming code is useful for both detection and correction of error present in the
received data. This code uses multiple parity bits and we have to place these parity bits
in the positions of powers of 2.
The minimum value of 'k' for which the following relation is correct (valid) is nothing
but the required number of parity bits.
$$2^k\geq n+k+1$$
Where,
‘n’ is the number of bits in the binary code (information)
‘k’ is the number of parity bits
Therefore, the number of bits in the Hamming code is equal to n + k.
Let the Hamming code is $b_{n+k}b_{n+k-1}.....b_{3}b_{2}b_{1}$ & parity bits $p_{k},
p_{k-1}, ....p_{1}$. We can place the ‘k’ parity bits in powers of 2 positions only. In
remaining bit positions, we can place the ‘n’ bits of binary code.
Based on requirement, we can use either even parity or odd parity while forming a
Hamming code. But, the same parity technique should be used in order to find whether
any error present in the received data.
Follow this procedure for finding parity bits.
 Find the value of p1, based on the number of ones present in bit positions b3, b5, b7 and so on. All these bit positions
(suffixes) in their equivalent binary have ‘1’ in the place value of 20.

 Find the value of p2, based on the number of ones present in bit positions b3, b6, b7 and so on. All these bit positions
(suffixes) in their equivalent binary have ‘1’ in the place value of 21.

 Find the value of p3, based on the number of ones present in bit positions b5, b6, b7 and so on. All these bit positions
(suffixes) in their equivalent binary have ‘1’ in the place value of 22.

 Similarly, find other values of parity bits.

Follow this procedure for finding check bits.


 Find the value of c1, based on the number of ones present in bit positions b1,
b3, b5, b7 and so on. All these bit positions (suffixes) in their equivalent
binary have ‘1’ in the place value of 20.
 Find the value of c2, based on the number of ones present in bit positions b 2,
b3, b6, b7 and so on. All these bit positions (suffixes) in their equivalent
binary have ‘1’ in the place value of 21.
 Find the value of c3, based on the number of ones present in bit positions b4,
b5, b6, b7 and so on. All these bit positions (suffixes) in their equivalent
binary have ‘1’ in the place value of 22.
 Similarly, find other values of check bits.
The decimal equivalent of the check bits in the received data gives the value of bit
position, where the error is present. Just complement the value present in that bit
position. Therefore, we will get the original binary code after removing parity bits.

Example 1
Let us find the Hamming code for binary code, d d d d = 1000. Consider even parity
4 3 2 1

bits.
The number of bits in the given binary code is n=4.
We can find the required number of parity bits by using the following mathematical
relation.
$$2^k\geq n+k+1$$
Substitute, n=4 in the above mathematical relation.
$$\Rightarrow 2^k\geq 4+k+1$$
$$\Rightarrow 2^k\geq 5+k$$
The minimum value of k that satisfied the above relation is 3. Hence, we require 3
parity bits p , p , and p . Therefore, the number of bits in Hamming code will be 7, since
1 2 3

there are 4 bits in binary code and 3 parity bits. We have to place the parity bits and
bits of binary code in the Hamming code as shown below.
The 7-bit Hamming code is
$b_{7}b_{6}b_{5}b_{4}b_{3}b_{2}b_{1}=d_{4}d_{3}d_{2}p_{3}d_{1}p_{2}bp_{1}$
By substituting the bits of binary code, the Hamming code will be
$b_{7}b_{6}b_{5}b_{4}b_{3}b_{2}b_{1} = 100p_{3}Op_{2}p_{1}$. Now, let us find the
parity bits.
$$p_{1}=b_{7}\oplus b_{5}\oplus b_{3}=1 \oplus 0 \oplus 0=1$$
$$p_{2}=b_{7}\oplus b_{6}\oplus b_{3}=1 \oplus 0 \oplus 0=1$$
$$p_{3}=b_{7}\oplus b_{6}\oplus b_{5}=1 \oplus 0 \oplus 0=1$$
By substituting these parity bits, the Hamming code will be
$b_{7}b_{6}b_{5}b_{4}b_{3}b_{2}b_{1}= 1001011$.

Example 2
In the above example, we got the Hamming code as
$b_{7}b_{6}b_{5}b_{4}b_{3}b_{2}b_{1}= 1001011$. Now, let us find the error position
when the code received is $b_{7}b_{6}b_{5}b_{4}b_{3}b_{2}b_{1}= 1001111$.
Now, let us find the check bits.
$$c_{1}=b_{7}\oplus b_{5}\oplus b_{3}\oplus b_{1}=1 \oplus 0 \oplus 1 \oplus1 =1$$
$$c_{2}=b_{7}\oplus b_{6}\oplus b_{3}\oplus b_{2}=1 \oplus 0 \oplus 1 \oplus1 =1$$
$$c_{3}=b_{7}\oplus b_{6}\oplus b_{5}\oplus b_{4}=1 \oplus 0 \oplus 0 \oplus1 =0$$
The decimal value of check bits gives the position of error in received Hamming code.
$$c_{3}c_{2}c_{1} = \left ( 011 \right )_{2}=\left ( 3 \right )_{10}$$
Therefore, the error present in third bit (b ) of Hamming code. Just complement the
3

value present in that bit and remove parity bits in order to get the original binary code
Boolean Algebra is an algebra, which deals with binary numbers & binary variables.
Hence, it is also called as Binary Algebra or logical Algebra. A mathematician, named
George Boole had developed this algebra in 1854. The variables used in this algebra
are also called as Boolean variables.
The range of voltages corresponding to Logic ‘High’ is represented with ‘1’ and the
range of voltages corresponding to logic ‘Low’ is represented with ‘0’.

Postulates and Basic Laws of Boolean Algebra


In this section, let us discuss about the Boolean postulates and basic laws that are
used in Boolean algebra. These are useful in minimizing Boolean functions.

Boolean Postulates
Consider the binary numbers 0 and 1, Boolean variable (x) and its complement (x’).
Either the Boolean variable or complement of it is known as literal. The four
possible logical OR operations among these literals and binary numbers are shown
below.
x+0=x
x+1=1
x+x=x
x + x’ = 1
Similarly, the four possible logical AND operations among those literals and binary
numbers are shown below.
x.1 = x
x.0 = 0
x.x = x
x.x’ = 0
These are the simple Boolean postulates. We can verify these postulates easily, by
substituting the Boolean variable with ‘0’ or ‘1’.
Note− The complement of complement of any Boolean variable is equal to the variable
itself. i.e., (x’)’=x.

Basic Laws of Boolean Algebra


Following are the three basic laws of Boolean Algebra.

 Commutative law
 Associative law
 Distributive law
Commutative Law
If any logical operation of two Boolean variables give the same result irrespective of the
order of those two variables, then that logical operation is said to be Commutative.
The logical OR & logical AND operations of two Boolean variables x & y are shown
below
x+y=y+x
x.y = y.x
The symbol ‘+’ indicates logical OR operation. Similarly, the symbol ‘.’ indicates logical
AND operation and it is optional to represent. Commutative law obeys for logical OR &
logical AND operations.

Associative Law
If a logical operation of any two Boolean variables is performed first and then the same
operation is performed with the remaining variable gives the same result, then that
logical operation is said to be Associative. The logical OR & logical AND operations of
three Boolean variables x, y & z are shown below.
x + (y + z) = (x + y) + z
x.(y.z) = (x.y).z
Associative law obeys for logical OR & logical AND operations.

Distributive Law
If any logical operation can be distributed to all the terms present in the Boolean
function, then that logical operation is said to be Distributive. The distribution of logical
OR & logical AND operations of three Boolean variables x, y & z are shown below.
x.(y + z) = x.y + x.z
x + (y.z) = (x + y).(x + z)
Distributive law obeys for logical OR and logical AND operations.
These are the Basic laws of Boolean algebra. We can verify these laws easily, by
substituting the Boolean variables with ‘0’ or ‘1’.

Theorems of Boolean Algebra


The following two theorems are used in Boolean algebra.

 Duality theorem
 DeMorgan’s theorem

Duality Theorem
This theorem states that the dual of the Boolean function is obtained by interchanging
the logical AND operator with logical OR operator and zeros with ones. For every
Boolean function, there will be a corresponding Dual function.
Let us make the Boolean equations (relations) that we discussed in the section of
Boolean postulates and basic laws into two groups. The following table shows these
two groups.

Group1 Group2

x+0=x x.1 = x

x+1=1 x.0 = 0

x+x=x x.x = x

x + x’ = 1 x.x’ = 0

x+y=y+x x.y = y.x

x + (y + z) = (x + y) + z x.(y.z) = (x.y).z

x.(y + z) = x.y + x.z x + (y.z) = (x + y).(x + z)

In each row, there are two Boolean equations and they are dual to each other. We can
verify all these Boolean equations of Group1 and Group2 by using duality theorem.

DeMorgan’s Theorem
This theorem is useful in finding the complement of Boolean function. It states that
the complement of logical OR of at least two Boolean variables is equal to the logical
AND of each complemented variable.
DeMorgan’s theorem with 2 Boolean variables x and y can be represented as
(x + y)’ = x’.y’
The dual of the above Boolean function is
(x.y)’ = x’ + y’
Therefore, the complement of logical AND of two Boolean variables is equal to the
logical OR of each complemented variable. Similarly, we can apply DeMorgan’s
theorem for more than 2 Boolean variables also.

Simplification of Boolean Functions


Till now, we discussed the postulates, basic laws and theorems of Boolean algebra.
Now, let us simplify some Boolean functions.

Example 1
Let us simplify the Boolean function, f = p’qr + pq’r + pqr’ + pqr
We can simplify this function in two methods.
Method 1
Given Boolean function, f = p’qr + pq’r + pqr’ +pqr.
Step 1 − In first and second terms r is common and in third and fourth terms pq is
common. So, take the common terms by using Distributive law.
⇒ f = (p’q + pq’)r + pq(r’ + r)
Step 2 − The terms present in first parenthesis can be simplified to Ex-OR operation.
The terms present in second parenthesis can be simplified to ‘1’ using Boolean
postulate
⇒ f = (p ⊕q)r + pq(1)
Step 3 − The first term can’t be simplified further. But, the second term can be
simplified to pq using Boolean postulate.
⇒ f = (p ⊕q)r + pq
Therefore, the simplified Boolean function is f = (p⊕q)r + pq
Method 2
Given Boolean function, f = p’qr + pq’r + pqr’ + pqr.
Step 1 − Use the Boolean postulate, x + x = x. That means, the Logical OR operation
with any Boolean variable ‘n’ times will be equal to the same variable. So, we can write
the last term pqr two more times.
⇒ f = p’qr + pq’r + pqr’ + pqr + pqr + pqr
Step 2 − Use Distributive law for 1 and 4 terms, 2 and 5 terms, 3 and 6 terms.
st th nd th rd th

⇒ f = qr(p’ + p) + pr(q’ + q) + pq(r’ + r)


Step 3 − Use Boolean postulate, x + x’ = 1 for simplifying the terms present in each
parenthesis.
⇒ f = qr(1) + pr(1) + pq(1)
Step 4 − Use Boolean postulate, x.1 = x for simplifying the above three terms.
⇒ f = qr + pr + pq
⇒ f = pq + qr + pr
Therefore, the simplified Boolean function is f = pq + qr + pr.
So, we got two different Boolean functions after simplifying the given Boolean function
in each method. Functionally, those two Boolean functions are same. So, based on the
requirement, we can choose one of those two Boolean functions.

Example 2
Let us find the complement of the Boolean function, f = p’q + pq’.
The complement of Boolean function is f’ = (p’q + pq’)’.
Step 1 − Use DeMorgan’s theorem, (x + y)’ = x’.y’.
⇒ f’ = (p’q)’.(pq’)’
Step 2 − Use DeMorgan’s theorem, (x.y)’ = x’ + y’
⇒ f’ = {(p’)’ + q’}.{p’ + (q’)’}
Step3 − Use the Boolean postulate, (x’)’=x.
⇒ f’ = {p + q’}.{p’ + q}
⇒ f’ = pp’ + pq + p’q’ + qq’
Step 4 − Use the Boolean postulate, xx’=0.
⇒ f = 0 + pq + p’q’ + 0
⇒ f = pq + p’q’
Therefore, the complement of Boolean function, p’q + pq’ is pq + p’q

You might also like