0% found this document useful (0 votes)
51 views86 pages

CTE 121 DIGITAL COMPUTER FUNDAMENTAL I Edited

The document is a handbook on digital computer fundamentals, focusing on number systems, data representation, and logic gates. It explains various number systems including binary, octal, decimal, and hexadecimal, detailing their digits, conversions, and the significance of weighting in positional systems. Additionally, it covers binary operations such as addition, subtraction, multiplication, and division, emphasizing their application in digital systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views86 pages

CTE 121 DIGITAL COMPUTER FUNDAMENTAL I Edited

The document is a handbook on digital computer fundamentals, focusing on number systems, data representation, and logic gates. It explains various number systems including binary, octal, decimal, and hexadecimal, detailing their digits, conversions, and the significance of weighting in positional systems. Additionally, it covers binary operations such as addition, subtraction, multiplication, and division, emphasizing their application in digital systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

DIGITAL COMPUTER

FUNDAMENTAL I
Number System, Set and Logic Gate HANDBOOK

Developed By:IKUEJAWA ABIOLA OLADEJI (CPMP,


ACIPM, ACIEHS, CCSP, ACICRM, AESM)

JULY 30, 2023


BEST SOLUTION POLYTECHNIC, AKURE, ONDO STATE
KM 12, Ondo Road, Akure, Nigeria
Week 1 -3: Understand the concept of data and information presentation in
digital system

1.1 Digits of a number


A digit is a symbol used to construct numerals that represent numbers. In the base ten
systems, the ten digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.A number is a concept that
stands for a counted value of something. A digit is a symbol used to construct
numerals that represent numbers. Digits are the single numbers used to represent
values in math. 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 are used in different combinations and
repetitions to represent all the values in math. Any of the ten numbers from 0 to 9 can
be represented by a symbol known as a digit. An example of a two-digit (2-D) number
is 65. It is made up of the 6 and 5.

1.2 Number System

A number system relates quantities and symbols. In digital system how


information is represented is key and there are different radices, i.e. number bases,
which a numbering system can use.

The memory unit stores programs as well as input, output and intermediate data.
The processor unit performs arithmetic and other data processing tasks as
specified by the program. The control unit supervises the flow of information
between various units. The program and data prepared by the user are transferred
into the memory unit by means of an input device such as punch card reader (or)
tele typewriter. An output device, such as printer, receives the result of the
computations and the printed results are presented to the user.

It can have different base values like: binary (base-2), octal (base-8), decimal
(base 10) and hexadecimal (base 16), here the base number represents the number
of digits used in that numbering system. As an example, in decimal numbering
system the digits used are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Therefore the digits for
binary are: 0 and 1, the digits for octal are: 0, 1, 2, 3, 4, 5, 6 and 7. For the
hexadecimal numbering system, base 16, the digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
A, B, C, D, E, F.

Numbers that contain only two digit 0 and 1 are called Binary Numbers. Each 0 or
1 is called a Bit, from binary digit. A binary number of 4 bits is called a Nibble. A
binary number of 8 bits is called a Byte. A binary number of 16 bits is called a
Word on some systems, on others a 32-bit number is called a Word while a 16-bit
number is called a Halfword.

Using 2 bit 0 and 1 to form

a binary number of 1 bit, numbers are 0 and 1

a binary number of 2 bit, numbers are 00, 01, 10, 11

a binary number of 3 bit, such numbers are 000, 001, 010, 011, 100, 101, 110, 111

a binary number of 4 bit, such numbers are 0000, 0001, 0010, 0011, 0100, 0101,
0110, 0111, 1000, 1001, 1010, 1011, 1100,1101,1110,1111

Therefore, using n bits there are 2n binary numbers of n bits

Each digit in a binary number has a value or weight. The LSB has a value of 1.
The second from the right has a value of 2, the next 4 , etc.,

1.3 List the number of digits of figures available in various number systems
Base 10, Base 8, Base 2, Base 16.

Table1.1 BinaryWeights

16 8 4 2 1

24 23 22 21 20

Table1.2 the binary equivalent for some decimal numbers are given
below.

Decimal 0 1 2 3 4 5 6 7 8 9 10 11

Binary 0 1 10 11 100 101 110 111 1000 1001 1010 1011


1.4 The significance of weighting of digits in a number system

The traditional number systems that we learned in school and use every day (decimal,
binary, hexadecimal, octal etc.) are positional number systems. In such a system, a
number is represented by a string of digits where each digit position has an
associated weight. The value of a number is a weighted sum of the digits.

 Example 1: 1734 = (1 x 1000) + (7 x 100) + (3 x 10) + (4 x 1)


 Example 2: 568.23 = (5 x 100) + (6 x 10) + (8 x 1) + (2 x 0.1) + (3 x 0.01)

In general, a number D of the form d1d0.d-1d-2 has the value

D = d1 x 101+ d0 x 100 + d-1 x 10-1 + d-2 x 10-2

Here 10 is called the radix or base.

Few Relevant Questions and Answers

Q1. Express the decimal number 106.58 as a sum of the values of each digit.

Answer: 106.58 = 1×102+0x101+6×100+5×10-1+8×10-


2
=1×100+0x10+6×1+5×0.1+8×0.01

Q2. What weight does the digit 7 have in each of the following numbers?

a. 1370 – Ans. 10
b. 6725 – Ans. 100
c. 7051 – Ans. 1000
d. 58.72 – Ans. 0.1

Weighting Structure of Other Number Systems

 Binary: 1011.01 = 1×23 + 0x22 + 1×21 + 1×20 + 1×2-1 + 1×2-2


 Hexadecimal: F1A2 = Fx163 + 1×162 + Ax161 + 2×160
 Octal: 436.7 = 4×82 + 3×81 + 6×80 + 7×8-1
 Base-4: 233 = 2×42 + 3×41 + 3×40
1.5 Number System Conversions

There are many methods or techniques which can be used to convert numbers
from one base to another. We'll demonstrate here the following −
 Decimal to Other Base System

 Other Base System to Decimal

 Other Base System to Non-Decimal

 Binary to Octal
 Octal to Binary

 Binary to Hexadecimal
 Hexadecimal to Binary

Decimal to Other Base System

 Step 1 − Divide the decimal number to be converted by the value of the new
base.

 Step 2 − Get the remainder from Step 1 as the rightmost digit (least significant
digit) of new base number.

 Step 3 − Divide the quotient of the previous divide by the new base.

 Step 4 − Record the remainder from Step 3 as the next digit (to the left) of the
new base number.

Repeat Steps 3 and 4, getting remainders from right to left, until the
quotient becomes zero in Step 3.

The last remainder thus obtained will be the Most Significant Digit (MSD)
of the new base number.

Example: Calculating Binary Equivalent of Decimal Number: 2910


Table 1.3 Calculating Binary Equivalent of Decimal Number: 2910

As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse


order so that the first remainder becomes the Least Significant Digit (LSD) and the
last remainder becomes the Most Significant Digit (MSD).

Decimal Number − 2910 = Binary Number − 111012.

Other Base System to Decimal System

Steps

 Step 1 − Determine the column (positional) value of each digit


(this depends on the position of the digit and the base of the
number system).

 Step 2 − Multiply the obtained column values (in Step 1) by the


digits in the corresponding columns.

 Step 3 − Sum the products calculated in Step 2. The total is the


equivalent value in decimal.

Example

Binary Number − 111012 Calculating Decimal Equivalent –


Table 1.4 Calculating Decimal Equivalent of Binary Number −
111012

Other Base System to Non-Decimal System

Steps

 Step 1 − Convert the original number to a decimal number (base 10).

 Step 2 − Convert the decimal number so obtained to the new base


number.

Example

Octal Number − 258

Calculating Binary Equivalent −

Table 1.5 Calculating Decimal Equivalent of Octal Number − 258

Octal Number 258 = Decimal Number 2110


Table 1.6 Decimal to Binary Conversion

Decimal Number − 2110 = Binary Number − 101012 Octal Number − 258 =


Binary Number − 101012

Binary to Octal

Steps

 Step 1 − Divide the binary digits into groups of three (starting from the
right).

 Step 2 − Convert each group of three binary digits to


one octal digit. Example

Binary Number − 101012

Calculating Octal Equivalent –

Table 1.7 Calculating Octal Equivalent of Binary Number − 101012


Binary Number − 101012 = Octal Number − 258

Octal to Binary

Steps

 Step 1 − Convert each octal digit to a 3 digit binary number (the octal
digits may be treated as decimal for this conversion).

 Step 2 − Combine all the resulting binary groups (of 3 digits


each) into a single binary number.

Example

Octal Number − 258

Calculating Binary Equivalent –

Table 1.8 Calculating the binary equivalent of the Octal


number - 258
Binary to Hexadecimal

Steps

 Step 1 − Divide the binary digits into groups of four (starting from the right).

 Step 2 − Convert each group of four binary digits to one hexadecimal


symbol.

Example

Binary Number − 101012

Calculating hexadecimal Equivalent –

Table 1.9 Calculating the Hexadecimal equivalent of the Binary number - 101012

Binary Number − 101012 = Hexadecimal Number − 1516

Hexadecimal to Binary

Steps

 Step 1 − Convert each hexadecimal digit to a 4 digit binary


number (the hexadecimal digits may be treated as decimal for this
conversion).

 Step 2 − Combine all the resulting binary groups (of 4 digits


each) into a single binary number.
Example

Hexadecimal Number − 1516 Calculating Binary Equivalent –

Table 1.10 Calculating Binary Equivalent of the Hexadecimal Number − 1516

Hexadecimal Number − 1516 = Binary Number − 10101

1.6 Binary number system is used in digital system


According to digital electronics and mathematics, a binary number is defined as a
number that is expressed in the binary system or base 2 numeral system. It describes
numeric values by two separate symbols; 1 (one) and 0 (zero). The base-2 system is
the positional notation with 2 as a radix.
Binary number system is used in digital system Because there are only two valid
Boolean values for representing either a logic “1” or a logic “0”, makes the system of
using Binary Numbers ideal for use in digital or electronic circuits and systems. ... A
binary number system uses both of these two states.

1.7 Special relationship between binary, octal and hexadecimal


From Table G.1 we see that 3 bits are needed to represent any octal digit, and 4 bits to
are needed to represent any hexadecimal digit. We can use this fact to convert between
binary, octal, and hexadecimal systems, as shown in Figure G.1.
Figure G.1. Converting between Binary, Octal, and Hexadecimal

The procedure for converting an octal to a binary is shown by the arrow marked (a).
We can prove that replacing each octal digit by its 3-bit equivalent binary value gives
the right result:

1738 = 1×82 + 7×81 + 3×80

= 1×(23)2 + 7×(23)1 + 3×(23)0

= 1×26 + 7×23 +3

= (0012)×26 + (1112)×23 + (011 ...


Week 4 – 6: GENERAL OBJECTIVE 2: Understand the different codes used in
digital system.

2.1 Binary operation, additions, subtraction, multiplication and division


We take the set of numbers on which the binary operations are performed as X. The
operations (addition, subtraction, division, multiplication, etc.) can be generalised as a
binary operation is performed on two elements (say a and b) from set X. The result of
the operation on a and b is another element from the same set X.
Thus, the binary operation can be defined as an operation * which is performed on a
set A. The function is given by *: A * A → A. So the operation * performed on
operands a and b is denoted by a * b.

Types of Binary Operation

There are four main types of binary operations which are:

 Binary Addition
 Binary Subtraction

 Binary Multiplication

 Binary Division

The complete details for each operation are available in the linked lessons, and an
example question is provided below for better understanding.

Binary Operations Example Questions

 Let us show that addition is a binary operation on real numbers (R) and natural
numbers (N). So if we add two operands which are natural numbers a and b, the result
will also be a natural number. The same holds good for real numbers. Hence,

+ : R x R → R is given by (a, b) → a + b

+ : N x N → N is given by (a, b) → a + b
 Let us show that multiplication is a binary operation on real numbers (R) and natural
numbers (N). So if we multiply two operands which are natural numbers a and b, the
result will also be a natural number. The same holds good for real numbers. Hence,

x: R x R → R is given by (a, b) → a x b

x: N x N → N is given by (a, b) → a x b

 Let us show that subtraction is a binary operation on real numbers (R). So if we subtract
two operands which are real numbers a and b, the result will also be a real number. The
same does not hold good for natural numbers. It is because if we take two natural
numbers, 3 and 4 as a and b, then 3 – 4 = -1, which is not a natural number. Hence,

– : R x R → R is given by (a, b)→ a – b

Similarly, the division cannot be defined on real numbers. This is because / : R x R → R


is given by (a, b)→ aa/b. Now if we take b as 0 here, a/b is not defined. Multiplication

Binary multiplication is one of the four binary arithmetic. The other three
fundamental operations are addition, subtraction and division. In the case of a binary
operation, we deal with only two digits, i.e. 0 and 1. The operation performed while finding
the binary product is similar to the conventional multiplication method. The four major steps
in binary digit multiplication are:

 0×0=0
 0×1=0
 1×0=0
 1×1=1
Note: The binary product of the two binary numbers 1 and 1 is equal to 1 only. And no
additional number is borrowed or carried forward in this operation.

Based on the above specification, we will solve here the problems online based on the
multiplication of binary numbers.

In this section, you will get answers for the questions about binary multiplication, including:

 What is Binary multiplication?


 Procedure to multiply two binary numbers
 Steps to Solve Binary multiplication using examples

What is Binary Multiplication?


The binary multiplication operation is actually a process of addition and shifting operation.
This process has to be continued until all the multiplier is done, and finally, the addition
operation is made.

Similar to the decimal system, the multiplication of the binary numbers is done by
multiplying the multiplicand with the multiplier. It is noted that the multiplication by zero
makes all the bits zero, and this step may be ignored in the intermediate steps. The
multiplication by 1 makes all the multiplicand value unchanged.

Binary Multiplication Table


The multiplication table for binary numbers is given below.

Binary Number Multiplication Value

0x0 0

1x0 0

0x1 0

1x1 1

Binary Multiplication Rules


Binary multiplication, like other binary operations, is much easier, unlike the decimal
multiplication when you remember the following multiplication rules. The rules of binary
multiplication are:

 0×0=0
 0×1=0
 1×0=0
 1 × 1 = 1 [No borrow or carry method is applicable here]
As per these rules, it very clear, that if the binary multiplication includes 0, then it will result
in zero itself. Hence,

Binary product of 0 and 0 is equal to 0

Binary product of 0 and 1 is equal to 0

Binary product of 1 and 0 is equal to 0

But,
Binary product of 1 and 1 is equal to 1.

To differentiate the rules for multiplication of binary numbers from other binary operations
such as addition, subtraction and division, please refer to below given table:

Addition Subtraction Division

0+0 = 0 0-0 = 0 0÷0 = 0

0+1 = 1 0-1 = 1 (1 is borrowed) 0÷1 = 0

1+0 = 1 1-0 = 1 1÷1 = 1

1+1 = 0 (1 is carry forwarded) 1-1 = 0

Examples of Binary Multiplication


Some binary multiplication examples are given below for a better understanding of this
concept.

Example 1: Solve 1010 × 101

Solution:

1010 × 101

1010

(×) 101

—————–

1010

0000

——————

01010 ……. First Intermediate Sum

1010

——————–

110010

Comparison with Decimal values:


10102 = 1010

10102 = 510

10 x 5 = 5010

(110010)2 = 5010

Another example of binary multiplication with a decimal point is as follows:

Question: 1011.01 × 110.1

Solution:

Here, the decimal point is placed three places from the least significant bit. Because, the
binary number 1011.01, the decimal point is 2 places from the LSB and 110.1 the decimal
point is placed 1 place from the LSB.

Binary Multiplication Questions


Solve the below-given questions using multiplication rules, based for binary numbers.

1. Multiply 10001 x 111


2. Solve 10101 x 110
3. Find the value of 11111 x 10000

Binary Subtraction
Binary subtraction is one of the four binary operations, where we perform the
subtraction method for two binary numbers (comprising only two digits, 0 and 1). This
operation is similar to the basic arithmetic subtraction performed on decimal numbers in
Maths. Hence, when we subtract 1 from 0, we need to borrow 1 from the next higher order
digit, to reduce the digit by 1 and the remainder left here is also 1.
Binary Subtraction

 0–0=0
 1–0=1

 1–1=0

 0 – 1 = 1 (Borrow 1)

Note: For fractional binary numbers, the same rule applies for subtraction, and the decimal
should be appropriately placed.

What is Binary Subtraction?

Can you subtract binary numbers? The answer is yes. Subtraction of binary numbers is an
arithmetic operation similar to the subtraction of decimal numbers or base 10 numbers. For
example, 1 + 1 + 1 = 3 in base 10 and 1 + 1 + 1 = 11 in binary number system. When you
add and subtract binary numbers, you will need to be careful when borrowing as these will
take place more often.

When you subtract several columns of binary digits, you must take into account the
borrowing. When 1 is to be subtracted from 0, the result is 1 where 1 is borrowed from the
next highest order bit or digit.

Binary Subtraction Table

The subtraction of binary numbers is given by:

Binary Number Subtraction Value

0–0 0

1–0 1

0–1 1 (Borrow 1 from the next high order digit)


1–1 0

Note:

The addition of two binary numbers 1 and 1 is 10, where we consider 0 and carry forward 1
to the next high order. But in the case of subtraction of 1 and 1, the answer is equal to 0, and
nothing is carried forward.

In the case of decimal subtraction, when 1 is subtracted from 0, then we borrow 1 from the
next preceding number and make it 10, and after subtraction, it results in 9, i.e. 10 – 1 = 9.
But for binary subtraction, it results in 1 only.

Binary Subtraction Rules

Rules and tricks: Binary subtraction is much easier than the decimal subtraction when you
remember the following rules:

 0–0=0
 0 – 1 = 1 ( with a borrow of 1)

 1–0=1

 1–1=0

Now, look at the example of the binary subtraction: 101 from 1010

How to Subtract Binary Numbers?

Learn how to do binary subtraction using the example: 1010 – 101

Procedure to do Binary Subtraction:

1010

(-) 101

Step 1: First consider the 1’s column, and subtract the one’s column,( 0 – 1 ) and it gives the
result 1 as per the condition of binary subtraction with a borrow of 1 from the 10’s place.
Step 2: After borrowing 1 from the 10’s column, the value 1 in the 10’s column is changed
into the value 0

1 Borrow

1010

(-) 1 0 1

——————

Step 3: So, subtract the value in the 10’s place, ( 0 – 0 ) = 0.

1 Borrow

1010

(-) 1 0 1

——————

01

Step 4: Now subtract the values in 100’s place. Borrow 1 from the 1000’s place ( 0 – 1 ) = 1.

1 1 Borrow

1010

(-) 1 0 1

——————

0101

So, the resultant of the subtraction operation is 0101.

When you cross-check the binary subtraction resultant value with the decimal value, the
resultant value should be the same.
The binary value 1010 is equal to the decimal value 10, and 101 is equivalent to 5

So, 10 – 5 = 5

Therefore, the decimal number 5 is equal to the binary number 0101.

Binary Subtraction Using 1’s Complement

 The number 0 represents the positive sign

 The number 1 represents the negative sign

Procedures for Binary Subtraction by 1’s Complement

 Write the 1’s complement of the subtrahend


 Then add the 1’s complement subtrahend with the minuend

 If the result has a carryover, then add that carry over in the least significant bit

 If there is no carryover, then take the 1’s complement of the resultant, and it is
negative.

Binary Subtraction Questions Using 1’s Complement

Question 1:

(110101)2 – (100101)2

Solution:

(1 1 0 1 0 1)2 = 5310

(1 0 0 1 0 1)2 = 3710 – subtrahend

Now take the 1’s complement of the subtrahend and add with minuend.

1 carry

110101

(+) 0 1 1 0 1 0
——————

001111

1 carry

——————

010000

Therefore, the solution is 010000

(010000)2 = 1610

Question 2:

(101011)2 – (111001)2

Solution:

Take 1’s complement of the subtrahend

111

101011

(+) 0 0 0 1 1 0 (1’s complement)

——————

110001

Now take the 1’s complement of the resultant since it does not carry 1

The resultant becomes 0 0 1 1 1 0

Now, add the negative sign to the resultant value

Therefore the solution is – (001110)2.


Binary Subtraction Examples

Consider other examples of binary subtractions are as follows:

Example 1: 0011010 – 001100

Solution:

1 1 Borrow

0011010

(-) 0 0 1 1 0 0

——————

0001110

Decimal Equivalent :

0 0 1 1 0 1 0 = 26

0 0 1 1 0 0 = 12

Therefore, 26 – 12 = 14

The binary resultant 0 0 0 1 1 1 0 is equivalent to 14.

Example 2: 0100010 – 0001010

Solution:

1 1 Borrow

0 1 0 0 0 1 0 = 3410

(-) 0 0 0 1 0 1 0 = 1010

——————

0 0 1 1 0 0 0 = 2410
Practice Problems

1. Perform the binary subtraction: 111001 – 101011

2. Subtract 1000 from 1111.

3. What is the value of (1110110)2 − (1010111)2?

ary Addition
Binary addition is one of the binary operations. To recall, the term “Binary Operation” represents
the basic operations of mathematics that are performed on two operands. Basic arithmetic operations like
addition, subtraction, multiplication, and division, play an important role in mathematics. In this lesson, all
the concepts about binary addition are explained, which includes:

What is Binary Addition


The binary addition operation works similarly to the base 10 decimal system, except that it is a base 2
system. The binary system consists of only two digits, 1 and 0. Most of the functionalities of the computer
system use the binary number system. The binary code uses the digits 1’s and 0’s to make certain processes
turn off or on. The process of the addition operation is very familiar to the decimal system by adjusting to
the base 2.

Before attempting the binary addition process, we should have complete knowledge of how the place works
in the binary number system. Because most of the modern digital computers and electronic circuits perform
the binary operation by representing each bit as a voltage signal. The bit 0 represents the “OFF” state, and
the bit 1 represents the “ON” state.

Rules of Binary Addition


Binary addition is much easier than the decimal addition when you remember the following tricks or rules.
Using these rules, any binary number can be easily added. The four rules of binary addition are:

 0+0=0
 0+1=1
 1+0=1
 1 + 1 =10

How To Do Binary Addition?


Now, look at the example of the binary addition:101 + 101

Procedure for Binary Addition of Numbers:

101

(+) 101
 Step 1: First consider the 1’s column, and add the one’s column,( 1+1 ) and it gives the result 10 as per the
condition of binary addition.
 Step 2: Now, leave the 0 in the one’s column and carry the value 1 to the 10’s column.
1

101

(+) 101

————–

 Step 3: Now add 10’s place, 1+( 0 + 0 ) = 1. So, nothing carries to the 100’s place and leave the value 1 in the
10’s place
1

101

(+) 101

————-

10

 Step 4: Now add the 100’s place ( 1 + 1 ) = 10. Leave the value 0 in the 100’s place and carries 1 to the 1000’s
place.
1

101

(+) 101

————-

1010

So, the resultant of the addition operation is 1010.

When you cross-check the binary value with the decimal value, the resultant value should be the same.

The binary value 101 is equal to the decimal value 5

So, 5 + 5 = 10

The decimal number 10 is equal to the binary number 1010.


Binary Addition Table
The table of adding two binary numbers 0 and 1 is given below:

x y x+y

0 0 0

0 1 1

1 0 1

1 1 0 (where 1 is carried over)

You can see from the above table, x and y are the two binary numbers. So when we give the input for x = 0
and y = 0, then the output is equal to 0. When x = 0 or 1 and y = 1 or 0, then x+y = 1. But when both x and y
are equal to 1, then their addition equals to 0, but the carryover number will equal to 1, which means
basically 1 + 1 = 10 in binary addition, where 1 is carry forwarded to the next digit.

Examples of Binary Addition


A few examples of binary additions are as follows:

Example 1: 10001 + 11101

Solution:

10001

(+) 1 1 1 0 1

———————–

101110

Example 2: 10111 + 110001

Solution:

111

10111

(+) 1 1 0 0 0 1
———————–

1001000

Binary Addition Using 1’s Complement


 The number 0 represents the positive sign
 The number 1 represents the negative sign
Addition of Positive and Negative Number

Case 1: When a positive number has a greater magnitude

Take the 1’s complement of the negative number, and the carry is added to the resultant sum at the 1’s place.
When you add the carry with the resultant, you will get the sum value.

Example:

+ 1111 and -1101

+1111=01111

– 1 1 0 1 = 1 0 0 1 0 (taking 1’s complement)

——————-

00001

———————

00010

Therefore, the solution is + 0010.

 Case 2: When a negative number has a greater magnitude


Take the 1’s complement of the negative number, and there will be no end-around carrying in this case.
Finally, the sum is obtained by taking the 1’s complement of the resultant.

Example:

+ 1111 and -1101

– 1 1 1 1 = 1 0 0 0 0 (taking 1’s complement)

+1 1 0 1 = 0 1 1 0 1

—————-
1110

——————

1 0 0 1 0 (taking 1’s complement)

Addition of Two Negative Numbers

Take the 1’s complement of both the negative numbers and then add. The end around carrying will appear,
and it will generate a number 1 in the sign bit. The sum value can be obtained by taking the 1’s complement
of the resultant.

Example:

 -1010 and – 0011

 1 0 1 0 = 1 0 1 0 1 (taking 1’s complement)


 0 0 1 1 = 1 1 1 0 0 (taking 1’s complement)
————————–

10001

—————————–

10010

—————————-

1 1 1 0 1 (taking 1’s complement)

Therefore the solution is – 1101y Division

What is Binary Division?


The binary division operation is similar to the base 10 decimal system, except the base 2. The division is
probably one of the most challenging operations of the basic arithmetic operations. There are different ways
to solve division problems using binary operations. Long division is one of them and the easiest and the
most efficient way. This section has been designed to answer questions about binary division, including:

 What is Binary division?


 Procedure to add two binary numbers
 Examples to Solve Binary division

Binary Division Rules


The binary division is much easier than the decimal division when you remember the following division
rules. The main rules of the binary division include:

 1÷1 = 1
 1÷0 = Meaningless
 0÷1 = 0
 0÷0 = Meaningless
Similar to the decimal number system, the binary division is similar, which follows the four-step process:

 Divide
 Multiply
 Subtract
 Bring down
Important Note: Binary division follows the long division method to find the resultant in an easy way.

Comparison with Decimal Value


(01111100)2 = (1111100)2 = 12410

(0010)2 = (10)2 = 210

You will get the resultant value as 62 when you divide 124 by 2.

So the binary equivalent of 62 is (111110)2

(111110)2 = 6210

Both the binary and the decimal system produce the same result.

Binary Division Examples


Example 1.

Question: Solve 01111100 ÷ 0010

Solution:

Given

01111100 ÷ 0010

Here the dividend is 01111100, and the divisor is 0010

Remove the zero’s in the Most Significant Bit in both the dividend and divisor, that doesn’t change the
value of the number.

So the dividend becomes 1111100, and the divisor becomes 10.


Now, use the long division method.

 Step 1: First, look at the first two numbers in the dividend and compare with the
divisor. Add the number 1 in the quotient place. Then subtract the value, you get 1 as
remainder.
 Step 2: Then bring down the next number from the dividend portion and do the step 1
process again
 Step 3: Repeat the process until the remainder becomes zero by comparing the
dividend and the divisor value.
 Step 4: Now, in this case, after you get the remainder value as 0, you have zero left in
the dividend portion, so bring that zero to the quotient portion.
Therefore, the resultant value is quotient value which is equal to 111110

So, 01111100 ÷ 0010 = 111110

Example 2: Solve using the long division method: 101101 ÷ 101

Solution:
So, when you bring down the fourth bit of the dividend, it does not match with the divisor. In
order to bring down the 5th and 6th bit of the dividend, add two zeros in the quotient value.

2.2 Define N’s complement where N is any number

1's complement

The 1's complement of a number is found by changing all 1's to 0's and all 0's to
1's. This is called as taking complement or 1's complement. Example of 1's
Complement is as follows.

Figure 1.1 Finding 1’s complement

2's complement

The 2's complement of binary number is obtained by adding 1 to the


Least Significant Bit (LSB) of 1's complement of the number.

2's complement = 1's


complement + 1 Example of 2's
Complement is as follows.
Figure 1.2 Finding 2’s complement

2.3 Perform addition and subtraction using 1’s complement

Addition using 1's complement


There are three different cases possible when we add two binary numbers which are as
follows:

Case 1: Addition of the positive number with a negative number when the positive
number has a greater magnitude.

Initially, calculate the 1's complement of the given negative number. Sum up with the given
positive number. If we get the end-around carry 1, it gets added to the LSB.

Example: 1101 and -1001

1. First, find the 1's complement of the negative number 1001. So, for finding 1's
complement, change all 0 to 1 and all 1 to 0. The 1's complement of the number 1001
is 0110.
2. Now, add both the numbers, i.e., 1101 and 0110;
1101+0110=1 0011
3. By adding both numbers, we get the end-around carry 1. We add this end around carry
to the LSB of 0011.
0011+1=0100

Case 2: Adding a positive value with a negative value in case the negative number has a
higher magnitude.

Initially, calculate the 1's complement of the negative value. Sum it with a positive number.
In this case, we did not get the end-around carry. So, take the 1's complement of the result to
get the final result.

Example: 1101 and -1110


1. First find the 1's complement of the negative number 1110. So, for finding 1's
complement, we change all 0 to 1, and all 1 to 0. 1's complement of the number 1110
is 0001.
2. Now, add both the numbers, i.e., 1101 and 0001;
1101+0001= 1110
3. Now, find the 1's complement of the result 1110 that is the final result. So, the 1's
complement of the result 1110 is 0001, and we add a negative sign before the number
so that we can identify that it is a negative number.

Case 3: Addition of two negative numbers

In this case, first find the 1's complement of both the negative numbers, and then we add
both these complement numbers. In this case, we always get the end-around carry, which get
added to the LSB, and for getting the final result, we take the 1's complement of the result.

Example: -1101 and -1110 in five-bit register

1. Firstly find the 1's complement of the negative numbers 01101 and 01110. So, for
finding 1's complement, we change all 0 to 1, and all 1 to 0. 1's complement of the
number 01110 is 10001, and 01101 is 10010.
2. Now, we add both the complement numbers, i.e., 10001 and 10010;
10001+10010= 1 00011
3. By adding both numbers, we get the end-around carry 1. We add this end-around carry
to the LSB of 00011.
00011+1=00100
4. Now, find the 1's complement of the result 00100 that is the final answer. So, the 1's
complement of the result 00100 is 110111, and add a negative sign before the number
so that we can identify that it is a negative number.

Subtraction using 1's complement

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

Example 1: 10101 - 00111

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.

Example 2: 10101 - 10111

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.
2.3 The limitation of 1’s complement
 1's complement notation is not very simple to understand because it is very much
different from the conventional way of representing signed numbers.
 The other disadvantage is that there are two notations for 0 (0000 and 1111), which is
very inconvenient when the computer wants to test for a 0 result.

2.4 Perform addition and subtraction using 2’s complement

Addition using 2's complement

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.

Example: 1101 and -1001

1. First, find the 2's complement of the negative number 1001. So, for finding 2's
complement, change all 0 to 1 and all 1 to 0 or find the 1's complement of the number
1001. The 1's complement of the number 1001 is 0110, and add 1 to the LSB of the
result 0110. So the 2's complement of number 1001 is 0110+1=0111
2. Add both the numbers, i.e., 1101 and 0111;
1101+0111=1 0100
3. By adding both numbers, we get the end-around carry 1. We discard the end-around
carry. So, the addition of both numbers is 0100.

Case 2: Adding of the positive value with a negative value when the negative number
has a higher magnitude.

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.

Example: 1101 and -1110

1. First, find the 2's complement of the negative number 1110. So, for finding 2's
complement, add 1 to the LSB of its 1's complement value 0001.
0001+1=0010
2. Add both the numbers, i.e., 1101 and 0010;
1101+0010= 1111
3. Find the 2's complement of the result 1110 that is the final result. So, the 2's
complement of the result 1110 is 0001, and add a negative sign before the number so
that we can identify that it is a negative number.

Case 3: Addition of two negative numbers

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.

Example: -1101 and -1110 in five-bit register

1. Firstly find the 2's complement of the negative numbers 01101 and 01110. So, for
finding 2's complement, we add 1 to the LSB of the 1's complement of these numbers.
2's complement of the number 01110 is 10010, and 01101 is 10011.
2. We add both the complement numbers, i.e., 10001 and 10010;
10010+10011= 1 00101
3. By adding both numbers, we get the end-around carry 1. This carry is discarded and
the final result is the 2.s complement of the result 00101. So, the 2's complement of
the result 00101 is 11011, and we add a negative sign before the number so that we
can identify that it is a negative number.

Subtraction using 2's complement

These are the following steps to subtract two binary numbers using 2's complement

o In the first step, find the 2's complement of the subtrahend.


o Add the complement number with the minuend.
o If we get the carry by adding both the numbers, then we discard this carry and the
result is positive else take 2's complement of the result which will be negative.

Example 1: 10101 - 00111

We take 2's complement of subtrahend 00111, which is 11001. Now, sum them. So,

10101+11001 =1 01110.

In the above result, we get the carry bit 1. So we discard this carry bit and remaining is the
final result and a positive number.

Example 2: 10101 - 10111


We take 2's complement of subtrahend 10111, which comes out 01001. Now, we add both of
the numbers. So,

10101+01001 =11110.

In the above result, we didn't get the carry bit. So calculate the 2's complement of the result,
i.e., 00010. It is the negative number and the final answer.
Week 7 – 9: GENERAL OBJECTIVE 3: Understand the various methods of
minimization required to simplify digital combinational circuits.

3.1 Venn’s diagram


A Venn diagram is used to visually represent the differences and the similarities between two
concepts. Venn diagrams are also called logic or set diagrams and are widely used in set
theory, logic, mathematics, businesses, teaching, computer science, and statistics.

A Venn diagram is a widely used diagram style that shows the logical relation between sets,
popularized by John Venn (1834–1923) in the 1880s. The diagrams are used to teach
elementary set theory, and to illustrate simple set relationships
in probability, logic, statistics, linguistics and computer science. A Venn diagram uses
simple closed curves drawn on a plane to represent sets. Very often, these curves are circles
or ellipses.

What is a Venn Diagram?

A Venn diagram is a diagram that helps us visualize the logical relationship


between sets and their elements and helps us solve examples based on these sets. A Venn
diagram typically uses intersecting and non-intersecting circles (although other closed
figures like squares may be used) to denote the relationship between sets.

Venn Diagram Example

Let us observe a Venn diagram example. Here is the Venn diagram that shows the
correlation between the following set of numbers.
 One set contains even numbers from 1 to 25 and the other set contains the numbers in the
5x table from 1 to 25.
 The intersecting part shows that 10 and 20 are both even numbers and also multiples of 5
between 1 to 25.

Terms Related to Venn Diagram

Let us understand the following terms and concepts related to Venn Diagram, to understand
it better.

Universal Set

Whenever we use a set, it is easier to first consider a larger set called a universal set that
contains all of the elements in all of the sets that are being considered. Whenever we draw a
Venn diagram:
 A large rectangle is used to represent the universal set and it is usually denoted by the
symbol E or sometimes U.
 All the other sets are represented by circles or closed figures within this larger rectangle.
 Every set is the subset of the universal set U.
Consider the above-given image:

 U is the universal set with all the numbers 1-10, enclosed within the rectangle.
 A is the set of even numbers 1-10, which is the subset of the universal set U and it is
placed inside the rectangle.
 All the numbers between 1-10, that are not even, will be placed outside the circle and
within the rectangle as shown above.
Subset

Venn diagrams are used to show subsets. A subset is actually a set that is contained within
another set. Let us consider the examples of two sets A and B in the below-given figure.
Here, A is a subset of B. Circle A is contained entirely within circle B. Also, all the elements
of A are elements of set B.

This relationship is symbolically represented as A ⊆ B. It is read as A is a subset of B or A


subset B. Every set is a subset of itself. I.e. A ⊆ A. Here is another example of subsets:
 N = set of natural numbers
 I = set of integers
 Here N ⊂ I, because all-natural numbers are integers.
Venn Diagram Symbols

There are more than 30 Venn diagram symbols. We will learn about the three most
commonly used symbols in this section. They are listed below as:

Venn Diagram Symbols Explanation

A ∪ B is read as A union B.

Elements that belong to either set A or


The union symbol - ∪
set B or both the sets.

U is the universal set.

A ∩ B is read as A intersection B.

The intersection symbol Elements that belong to both sets A and


-∩ B.

U is the universal set.

A' is read as A complement.


The complement symbol
Elements that don't belong to set A.
- Ac or A'
U is the universal set.

Let us understand the concept and the usage of the three basic Venn diagram symbols using
the image given below.
Total Elements
Symbol It refers to
(No. of students)

The number of students that


1 + 10 + 2 + 2 + 6
A∪C prefer either burger or pizza or
+ 9 = 30
both.

The number of students that


A∩C 2+2=4
prefer both burger and pizza.

The number of students that


A∩B∩
prefer a burger, pizza as well 2
C
as hotdog.

The number of students that


Ac or A' 10 + 6 + 9 = 25
do not prefer a burger.

Venn Diagram for Sets Operations

In set theory, we can perform certain operations on given sets. These operations are as
follows,

 Union of Set
 Intersection of set
 Complement of set
 Difference of set

Union of Sets Venn Diagram

The union of two sets A and B can be given by: A ∪ B = {x | x ∈ A or x ∈ B}. This
operation on the elements of set A and B can be represented using a Venn diagram with two
circles. The total region of both the circles combined denotes the union of sets A and B.

Intersection of Set Venn Diagram

The intersection of sets, A and B is given by: A ∩ B = {x : x ∈ A and x ∈ B}. This operation
on set A and B can be represented using a Venn diagram with two intersecting circles. The
region common to both the circles denotes the intersection of set A and Set B.

Complement of Set Venn Diagram

The complement of any set A can be given as A'. This represents elements that are not
present in set A and can be represented using a Venn diagram with a circle. The region
covered in the universal set, excluding the region covered by set A, gives the complement of
A.

Difference of Set Venn Diagram

The difference of sets can be given as, A - B. It is also referred to as a ‘relative complement’.
This operation on sets can be represented using a Venn diagram with two circles. The region
covered by set A, excluding the region that is common to set B, gives the difference of sets A
and B.
We can observe the above-explained operations on sets using the figures given below,
Venn Diagram for Three Sets

Three sets Venn diagram is made up of three overlapping circles and these three circles show
how the elements of the three sets are related. When a Venn diagram is made of three sets, it
is also called a 3-circle Venn diagram. In a Venn diagram, when all these three circles
overlap, the overlapping parts contain elements that are either common to any two circles or
they are common to all the three circles. Let us consider the below given example:

Here are some important observations from the above image:

 Elements in P and Q = elements in P and Q only plus elements in P, Q, and R.


 Elements in Q and R = elements in Q and R only plus elements in P, Q, and R.
 Elements in P and R = elements in P and R only plus elements in P, Q, and R.
How to Draw a Venn Diagram?

Venn diagrams can be drawn with unlimited circles. Since more than three becomes very
complicated, we will usually consider only two or three circles in a Venn diagram. Here are
the 4 easy steps to draw a Venn diagram:

 Step 1: Categorize all the items into sets.


 Step 2: Draw a rectangle and label it as per the correlation between the sets.
 Step 3: Draw the circles according to the number of categories you have.
 Step 4: Place all the items in the relevant circles.
Example: Let us draw a Venn diagram to show categories of outdoor and indoor for the
following pets: Parrots, Hamsters, Cats, Rabbits, Fish, Goats, Tortoises, Horses.
 Step 1: Categorize all the items into sets (Here, its pets): Indoor pets: Cats, Hamsters,
and, Parrots. Outdoor pets: Horses, Tortoises, and Goats. Both categories (outdoor and
indoor): Rabbits and Fish.
 Step 2: Draw a rectangle and label it as per the correlation between the two sets. Here,
let's label the rectangle as Pets.
 Step 3: Draw the circles according to the number of categories you have. There are two
categories in the sample question: outdoor pets and indoor pets. So, let us draw two
circles and make sure the circles overlap.

 Step 4: Place all the pets in the relevant circles. If there are certain pets that fit both the
categories, then place them at the intersection of sets, where the circles overlap. Rabbits
and fish can be kept as indoor and outdoor pets, and hence they are placed at the
intersection of both circles.
 Step 5: If there is a pet that doesn't fit either the indoor or outdoor sets, then place it
within the rectangle but outside the circles.
Venn Diagram Formula

For any two given sets A and B, the Venn diagram formula is used to find one of the
following: the number of elements of A, B, A U B, or A ⋂ B when the other 3 are given. The
formula says:

 n(A U B) = n(A) + n(B) – n (A ⋂ B)


Here, n(A) and n(B) represent the number of elements in A and B respectively. n(A U B) and
n(A ⋂ B) represent the number of elements in A U B and A ⋂ B respectively. This formula
is further extended to 3 sets as well and it says:

 n (A U B U C) = n(A) + n(B) + n(C) - n(A ⋂ B) - n(B ⋂ C) - n(C ⋂ A) + n(A ⋂ B ⋂ C)


Here is an example of Venn diagram formula.

Example: In a cricket school, 12 players like bowling, 15 like batting, and 5 like both. Then
how many players like either bowling or batting.

Solution:

Let A and B be the sets of players who like bowling and batting respectively. Then

n(A) = 12

n(B) = 15

n(A ⋂ B) = 5

We have to find n(A U B). Using the Venn diagram formula,

n(A U B) = n(A) + n(B) – n (A ⋂ B)

n(A U B) = 12 + 15 - 5 = 22.

Applications of Venn Diagram


There are several advantages to using Venn diagrams. Venn diagram is used to illustrate
concepts and groups in many fields, including statistics, linguistics, logic, education,
computer science, and business.

 We can visually organize information to see the relationship between sets of items, such
as commonalities and differences, and to depict the relations for visual communication.
 We can compare two or more subjects and clearly see what they have in common versus
what makes them different. This might be done for selecting an important product or
service to buy.
 Mathematicians also use Venn diagrams in math to solve complex equations.
 We can use Venn diagrams to compare data sets and to find correlations.
 Venn diagrams can be used to reason through the logic behind statements or equations.
Important Notes on Venn Diagrams:

Here is a list of a few points that should be remembered while studying Venn diagrams:

 Every set is a subset of itself i.e., A ⊆ A.


 A universal set accommodates all the sets under consideration.
 If A ⊆ B and B ⊆ A, then A = B
 The complement of a complement is the given set itself.

Venn Diagram Symbols

If we talk about the set theory, then you have to learn more than 30 symbols, but you can
make a Venn diagram by only understanding the few basic symbols. The diagram represents
the classification and comparison of data sets; therefore, you only have to learn six symbols
to get started.

Symbol Name Example Description


The letter A represents the circle with all the
A Set A
elements of set A in the diagram.

A ꓵ B= {9, 10}
The symbol ꓵ between two sets represents only
ꓵ Intersection
similar elements. It shows the elements that are only
in both sets.

A ∪ B= {1, 2, 3, 4,….., 10}


∪ Union The symbols ∪ between the two sets represent all the
elements in both sets.

A – B= {1, 2, 3, 4}
− Difference By set A from set B, you get a solution set with
elements of set A that are not in set B.

Ac= U-A
Complement of
Ac You can find the complement of set A by subtracting
a set
all elements of set A from the universal set.

A={}
{} Empty Set This symbol depicts that the set does not have any
elements.

This symbol represents the set that contains


U Universal Set everything. A universal set is a superset to every set
included in the diagram.

3.2 Use Venn’s diagram:


i. Union of a set
Union of two or more sets is the set containing all the elements of the given sets. Union of
sets can be written using the symbol “⋃”. Suppose the union of two sets X and Y can be
represented as X ⋃ Y. As we know, sets can undergo different operations and the basic
operations that can be performed on sets are as follows:

1. Union of sets
2. Intersection of sets

3. Difference of sets

In mathematics, we perform certain operations like addition, subtraction, multiplication, etc.


These operators generally take two or more operands and give a result based on the operation
performed. Similarly, in set theory usually, certain operations are performed on two or more
sets to get a new set of elements based on the operation performed. The union and
intersection of sets represent the number of elements carried by the operation and executing
the result of a collective set. In the case of union, all the elements are included in the result
but in the case of the intersection, only the common elements are considered.

Sometimes, students also get confused with the union and universal set. Union of two or
more sets is an operation performed on them, which results in a collection of elements
present in both the sets, whereas a universal set is itself a set, which contains all the elements
of other sets, including its own elements.

In the upcoming discussions, you will learn about the union operation on sets thoroughly.

Union of Sets Definition

The union of two sets X and Y is equal to the set of elements that are present in set X, in set
Y, or in both the sets X and Y. This operation can be represented as;

X ∪ Y = {a: a ∈ X or a ∈ Y}

Let us consider an example, say; set A = {1, 3, 5} and set B = {1, 2, 4} then;

A ∪ B = {1, 2, 3, 4, 5}

Now, let us learn how can we represent the union of two sets in a Venn diagram.
Venn Diagram of Union of Sets

Let us consider a universal set U such that A and B are the subsets of this universal set. The
union of two sets A and B is defined as the set of all the elements which lie in set A and set
B or both the elements in A and B altogether. The union of the set is denoted by the symbol
‘∪’.

In the given Venn diagram, the red-coloured portion represents the union of both sets A and
B.

Thus, the union of two sets A and B is given by a set C, which is also a subset of the
universal set U such that C consists of all those elements or members which are either in set
A or set B or in both A and B i.e.,

C = A ∪ B = {x : x ∈ A or x ∈ B}

A Union B Formula

The union of set A and set B is equal to the set containing all the elements in A and B. This
is represented as A U B and can be read as “A union B” or “A or B”.

A union B formula is generally used to calculate the unions of set A and set B. The formula
for A union B indicates that each element present in A or B (leaving duplicates) is present in
A U B. From the definition of the union of sets, the formula for A union B formula can be
written as:

A U B = {x : x ∈ A or x ∈ B}
Formula for Number of Elements in A union B

Consider two sets, A and B, such that the number of elements in the union of A and B can be
calculated as follows.

n(A U B) = n(A) + n(B) – n(A ∩ B)

Here,

n(A U B) = Total number of elements in A U B; is called the cardinality of a set A U B

n(A) = Number of elements in A; is called the cardinality of set A

n(B) = Number of elements in B; is called the cardinality of set B

n(A ∩ B) = The number of elements that are common to both A and B; is called the
cardinality of set A ∩ B, i.e. A intersection B

Properties of Union of Sets

i) Commutative Law: The union of two or more sets follows the commutative law i.e., if
we have two sets A and B then,

A∪B=B∪A

Example: A = {a, b} and B = {b, c, d}

So, A∪B = {a, b, c, d}

B∪A = {b, c, d, a}

Since, in both the union, the group of elements is same. Therefore, it satisfies commutative
law.

A∪B=B∪A

ii) Associative Law: The union operation follows the associative law i.e., if we have three
sets A, B and C then

(A ∪ B) ∪ C = A ∪ (B ∪ C)
Example: A = {a, b} and B = {b, c, d} and C = {a, c, e}

(A ∪ B) ∪ C = {a, b, c, d} ∪ {a, c, e} = {a, b, c, d, e}

A ∪ (B ∪ C) = {a, b} ∪ {b, c, d, e} = {a, b, c, d, e}

Hence, associative law proved.

iii) Identity Law: The union of an empty set with any set A gives the set itself i.e.,

A∪∅=A

Suppose, A = {a, b, c} and ∅ = {}

then, A ∪ ∅ = {a, b, c} ∪ {} = {a, b, c}

iv) Idempotent Law: The union of any set A with itself gives the set A i.e.,

A∪A=A

Suppose, A = {1, 2, 3, 4, 5}

then A ∪ A = {1, 2, 3, 4, 5} ∪ {1, 2, 3, 4, 5} = {1, 2, 3, 4, 5} = A

v) Domination Law: The union of a universal set U with its subset A gives the universal set
itself.

A∪U=U

Suppose, A = {1, 2, 4, 7} and U = {1, 2, 3, 4, 5, 6, 7}

then A ∪ U = {1, 2, 4, 7} ∪ {1, 2, 3, 4, 5, 6, 7} = {1, 2, 3, 4, 5, 6, 7} = U

Hence, proved.

Go through the solved examples given below to understand the concept in a better way.

Solved Examples

Example 1:
Let U be a universal set consisting of all the natural numbers until 20 and set A and B
be a subset of U defined as A = {2, 5, 9, 15, 19} and B = {8, 9, 10, 13, 15, 17}. Find A ∪ B.

Solution:

Given,

U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}

A = {2, 5, 9, 15, 19}

B = {8, 9, 10, 13, 15, 17}

A ∪ B = {2, 5, 8, 9, 10, 13, 15, 17, 19}

This can be represented using the following Venn diagram:

Example 2:

If set A contains 13 elements, set B contains 8 elements and the intersection of these two
sets contains 5 elements, then find the number of elements in A union B.

Solution:

Given,

Number of elements in set A = n(A) = 13

Number of elements in set B = n(B) = 8


Number of elements in A intersection B = n(A ∩ B) = 5

We know that,

n(A U B) = n(A) + n(B) – n(A ∩ B)

= 13 + 8 – 5

= 21 – 5

= 16

Therefore, the number of elements in A union B = n(A U B) = 16.

ii. Intersection of a set


In Mathematics, a set is a well-defined collection of objects. Unlike numbers, we can
define different operations on sets and examine their properties. In set theory, an
operation is an exercise to combine different sets such that a new set will be obtained
with distinct properties. In this article, you will learn the intersection of sets definition,
formula, expressions, along with properties and examples in detail.

What is Intersection of Sets?

The intersection of sets A and B is the set of all elements which are common to both A and
B.

Suppose A is the set of even numbers less than 10 and B is the set of the first five multiples
of 4, then the intersection of these two can be identified as given below:

A = {2, 4, 6, 8}

B = {4, 8, 12, 16, 20}

The elements common to A and B are 4 and 8.

Therefore, the set of elements in the intersection A and B = {4, 8}

Intersection of Sets Symbol


The intersection of sets can be denoted using the symbol ‘∩’. As defined above, the
intersection of two sets A and B is the set of all those elements which are common to both A
and B. Symbolically, we can represent the intersection of A and B as A ∩ B.

A intersection B Formula

The formula for the intersection of sets can be given based on the definition. That means, the
intersection of two sets A and B is the set containing elements that are common to both A
and B. This can be expressed as:

A ∩ B = {x : x ∈ A and x ∈ B}

That means x is an element of A ∩ B, if and only if x is an element of both A and B. Thus,


we can use the word “AND” to represent the intersection of sets. Sometimes, the above
expression can also be referred to as the intersection of sets formula.

Intersection of Two Sets

The intersection of two given sets, say X and Y, is the most extensive set containing all the
elements common to X and Y. The intersection of two sets can be a set again with at least
one element or it can be an empty set, i.e. no elements in the intersection set. Suppose A and
B are two sets such that A ∩ B = φ, then A and B are called disjoint sets. That means, there
are no elements at the intersection of A and B.

Intersection of Three Sets

It is possible to find the intersection of more than two sets. In this section, you will learn how
to find the intersection of three sets. Suppose A, B and C are three sets, then the intersection
of these three sets is the set of all elements that are common to A, B and C. This can be
represented as A ∩ B ∩ C. This can be better understood with the help of the example given
below.
For example, A = {6, 8, 10, 12, 14, 16}, B = {9, 12, 15, 18, 21, 24} and C = {4, 8, 12, 16, 20,
24, 28}.

The intersection of these 3 sets can be expressed as, A ∩ B ∩ C.

Let us identify the common elements of the given sets.

12 is the only common element in A, B and C.

Therefore, A ∩ B ∩ C = {12}

Intersection of Sets Using Venn Diagram

The intersection of two sets can be represented using the Venn diagram as shown below.

In the above diagram, the shaded portion represents the intersection of two sets A and B.

Similarly, we can draw a Venn diagram for the intersection of 3 sets as shown below.
In the above diagram, we can see that the centermost region denotes the intersection of three
sets A, B and C.

Intersection of Sets Properties

Some Properties of the Operation of Intersection are listed below:

(i) Commutative law: A ∩ B = B ∩ A

Consider two sets A = {1, 2, 3, 4, 5, 6} and B = {2, 3, 5, 7}.

Now, A ∩ B = {1, 2, 3, 4, 5, 6} ∩ {2, 3, 5, 7} = {2, 3, 5}

B ∩ A = {2, 3, 5, 7} ∩ {1, 2, 3, 4, 5, 6} = {2, 3, 5}

Therefore, A ∩ B = B ∩ A.

(ii) Associative law: (A ∩ B) ∩ C = A ∩ (B ∩ C)

Let A = {1, 2, 3, 4}, B = {3, 4, 5, 6}, and C = {5, 6, 7, 8 }.

Now,

A ∩ B = {1, 2, 3, 4} ∩ {3, 4, 5, 6} = {3, 4}

(A ∩ B) ∩ C = {3, 4} ∩ {5, 6, 7, 8} = { } = φ

And

B ∩ C = {3, 4, 5, 6} ∩ {5, 6, 7, 8} = {5, 6}

A ∩ (B ∩ C) = {1, 2, 3, 4} ∩ {5, 6} = { } = φ
Therefore, (A ∩ B) ∩ C = A ∩ (B ∩ C)

(iii) Law of φ and U: φ ∩ A = φ, U ∩ A = A

Consider φ = { } and A = {10, 11, 12}.

φ ∩ A = { } ∩ {10, 11, 12} = { } = φ

Let U = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20} and A = {4, 8, 12, 16, 20}.

U ∩ A = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20} ∩ {4, 8, 12, 16, 20} = {4, 8, 12, 16, 20} = A

(iv) Idempotent law: A ∩ A = A

Suppose A = {a, b, c, d, e} such that A ∩ A = {a, b, c, d, e} ∩ {a, b, c, d, e} = {a, b, c, d, e}


=A

(v) Distributive law: A ∩ (B U C) = (A ∩ B) U (A ∩ C), i. e., ∩ distributes over U

Let us take three sets A = = {2, 4, 6, 8}, B = {2, 3, 5, 7} and C = {3, 4, 5, 6}.

B U C = {2, 3, 5, 7} U {3, 4, 5, 6} = {2, 3, 4, 5, 6, 7}

A ∩ (B U C) = {2, 4, 6, 8} ∩ {2, 3, 4, 5, 6, 7} = {2, 4, 6}

A ∩ B = {2, 4, 6, 8} ∩ {2, 3, 5, 7} = {2}

A ∩ C = {2, 4, 6, 8} ∩ {3, 4, 5, 6} = {4, 6}

(A ∩ B) U (A ∩ C) = {2} U {4, 6} = {2, 4, 6}

Therefore, A ∩ (B U C) = (A ∩ B) U (A ∩ C)

Intersection of Sets Examples


Go through the examples given below to get a thorough understanding of the concept.

Example 1: If A = { 3, 5, 7, 9, 11}, B = {7, 9, 11, 13}, and C = {11, 13, 15}, then find B ∩
C and A ∩ B ∩ C.

Solution:

Given,

A = { 3, 5, 7, 9, 11}

B = {7, 9, 11, 13}

C = {11, 13, 15}


B ∩ C = {11, 13}

A ∩ B ∩ C = {11}

Example 2: Represent the following using Venn diagrams.

(i) A ∩ (B ∪ C)

(ii) (A ∩ B) ∪ (A ∩ C)

Solution:

Venn diagram of A ∩ (B ∪ C)

Venn diagram of (A ∩ B) ∪ (A ∩ C)

Union and Intersection of Sets

The union of two sets A and B is the set of all those elements which are either in A or in B,
whereas the intersection of two sets A and B is the set of all elements which are common.
We can define the formulas for both union and intersection of given sets based on the
cardinality of sets as given below.

If A and B are finite sets such that A ∩ B = φ, then

n (A ∪ B) = n (A) + n (B).

If A ∩ B ≠ φ, then

n (A ∪ B) = n (A) + n (B) – n (A ∩ B)

Practice Problems

1. If P = {1, 2, 3, 4}, Q = {3, 4, 5, 6}, find P Q.

2. If A = {1, 2, 3, 4}, B = {3, 4, 5, 6}, C = {5, 6, 7, 8 }and D = { 7, 8, 9, 10 }, then


calculate the following:
(i) A ∩ B
(ii) B ∩ C
(iii) A ∩ C ∩ D
(iv) A ∩ C
(v) B ∩ D
(vi) A ∩ (B ∪ C)

1. Consider three sets A = {1, 2, 3}, B = {2, 3, 5} and C = {4, 5, 6}. Find (A ∩ B) ∩ C.

Frequently Asked Questions on Intersection of Sets


Q1

What is the intersection of a set?


The intersection operation on sets gives the set of elements that are common in the given
sets.
Q2

What is ∩ called?
The symbol ∩ denotes the intersection of sets. For example, the intersection of two sets X
and Y can be represented as X ∩ Y.
Q3

What is union and intersection of sets?


The union of two sets A and B is the set of all those elements which are either in A or in B,
i.e. A ∪ B, whereas the intersection of two sets A and B is the set of all elements which are
common. The intersection of these two sets is denoted by A ∩ B.
Q4

What is another word for intersection?


The other word for intersection is AND which means we can represent the intersection of A,
B as A and B or A ∩ B.
Q5

Is A ∩ B is equal to B ∩ A?
Yes, A ∩ B is equal to B ∩ A. This represents the commutative law of the intersection of
sets.

iii. Universal sets

A universal set (usually denoted by U) is a set which has elements of all the related sets,
without any repetition of elements. Say if A and B are two sets, such as A = {1,2,3} and B =
{1,a,b,c}, then the universal set associated with these two sets is given by U = {1,2,3,a,b,c}.

In Mathematics, the collection of elements or group of objects is called a Set. There are
various types of sets like Empty set, Finite set, Infinite set, Equivalent set, Subset, Superset
and Universal set. All these sets have their own importance in Mathematics. There is a lot of
usage of sets in our day-to-day life, but normally they are used to represent bulk data or
collection of data in a database. For example, our hand is a set of fingers, where each finger
is different from the other one. The notation of set is usually given by curly brackets, {} and
each element in the set is separated by commas like {4, 7, 9}, where 4, 7, and 9 are the
elements of sets.

Universal set contains a group of objects or elements which are available in all the sets and is
represented in a Venn diagram.
Universal Set Definition

A universal set is a set which contains all the elements or objects of other sets, including its
own elements. It is usually denoted by the symbol ‘U’.

Suppose Set A consists of all even numbers such that, A = {2, 4, 6, 8, 10, …} and set B
consists of all odd numbers, such that, B = {1, 3, 5, 7, 9, …}. The universal set U consists of
all natural numbers, such that, U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,….}. Therefore, as we know,
all the even and odd numbers are a part of natural numbers. Therefore, Set U has all the
elements of Set A and Set B.

There is no formula to find the universal set, we just have to represent all the elements in a
single which is collectively called a universal set.

Fact: There is no standard notation for Universal set symbol, it can also be denoted by any
other entity like ‘V’ or ‘ξ’.

Example: Let us say, there are three sets named as A, B and C. The elements of all sets A,
B and C is defined as;

A={1,3,6,8}

B={2,3,4,5}

C={5,8,9}

Find the universal set for all the three sets A, B and C.

Answer: By the definition we know, the universal set includes all the elements of the given
sets. Therefore, Universal set for sets A, B and C will be,

U={1,2,3,4,5,6,8,9}

Explanation: From the above example, we can see that the elements of sets A, B and C are
altogether available in Universal set ‘U’. Also, if you observe, no elements in the universal
set are repeated and all the elements are unique.
Note: If Universal set contains Sets A, B and C, then these sets are also called subsets of
Universal set. Denoted by;
A ⊂ U (A subset of U)

B ⊂ U (B subset of U)

C ⊂ U (C subset of U)

Venn Diagram of Universal Set

For Venn diagram representation of the universal set, we can take the example as;

U={heptagon} consisting of set A={pentagon, hexagon, octagon} and set C={nonagon}.

We can understand the concept of Universal set also by taking an example of the real world.
In this world, we have set of a human being, set of animals and also set of all living things,
which we can consider as a subset of U. But we cannot consider a set of trees as a subset of
U.

Complement of Universal Set

There is a complement of set for every set. The empty set is defined as the complement of
the universal set. That means where Universal set consists of a set of all elements, the empty
set contains no elements of the subsets. The empty set is also called a Null set and is denoted
by ‘{}’.
Universal set and Union of set

Students sometimes get confused between universal set and union of the set. They think both
are the same but that is not true.

The universal set is a set which consists of all the elements or objects, including its own
elements. It is represented by just a symbol ‘U’. But the union of sets is an operation
performed on two sets, say A and B, which results in a set that has all elements belonging
either to set A and set B or both. The operand of union of set is given by ‘∪’.

For example, Set A = {a,b,c} and set B={c,d,e} and U={1,2}. Therefore, the universal set for
set A, B and U itself will be;

U ={a,b,c,d,e,1,2}

You can see, U is also a set which collectively shows all the elements of A, B and of itself.

Now, the union of set A and B is given by:

A∪B = {a,b,c,d,e}

iv. Complement of a set

If U is a universal set and A be any subset of U then the complement of A is the set of all
members of the universal set U which are not the elements of A.

𝐴′ = 𝑥 : 𝑥 ∈ 𝑈 𝑎𝑛𝑑 𝑥 ∉ 𝐴

Alternatively it can be said that the difference of the universal set U and the subset A gives
us the complement of set A.

Venn Diagram for the Complement of a set

The Venn diagram to represent the complement of a set A is given by:


Complement of a Set Examples

To make it more clear consider a universal set U of all natural numbers less than or equal to
20.

Let the set A which is a subset of U be defined as the set which consists of all the prime
numbers.

Thus we can see that A = {{2, 3, 5, 7, 11, 13, 17, 19}}

Now the complement of this set A consists of all those elements which is present in the
universal set but not in A. Therefore, A’ is given by:

A’={{1,4,6,8,9,10,12,14,15,16,18,20}}

Example: Let U be the universal set which consists of all the integers greater than 5 but
less than or equal to 25. Let A and B be the subsets of U defined as:

𝑨 = 𝒙 : 𝒙 ∈ 𝑼 𝒂𝒏𝒅 𝒙 𝒊𝒔 𝒂 𝒑𝒆𝒓𝒇𝒆𝒄𝒕 𝒔𝒒𝒖𝒂𝒓𝒆

B = {7, 9, 16, 18, 24}

Find the complement of sets A and B and the intersection of both the complemented
sets.

Solution: The universal set is defined as:

U = {{6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}}

Also, A = {9,16,25} and


B = {7,9,16,18,24}

The complement of set A is defined as:

\(\begin{array}{l}A’ = {x~:~x~∈~U~ and ~x~∉~A}\end{array} \)

Therefore,

A’ = {6,7,8,10,11,12,13,14,15,17,18,19,20,21,22,23,24}

Similarly the complement of set B can be given by:

B’ = {6,8,10,11,12,13,14,15,17,19,20,21,22,23,25}

The intersection of both the complemented sets is given by A’∩ B’.

Rightarrow A’∩ B’= {6, 8, 10, 11, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23}

We can see from the above discussions that if a set A is a subset of the universal set U then
the complement of set A, i.e. A’ is also a subset of U.

3.3 Apply venn’s diagram to simplify Boolean expression


The fourth example has A partially overlapping B. Though, we will first look at the whole of
all hatched area below, then later only the overlapping region. Let’s assign some Boolean
expressions to the regions above as shown below. Below left there is a red horizontal hatched
area for A. There is a blue vertical hatched area for B.

If we look at the whole area of both, regardless of the hatch style, the sum total of all hatched
areas, we get the illustration above right which corresponds to the inclusive OR function of
A, B. The Boolean expression is A+B. This is shown by the 45 o hatched area. Anything
outside of the hatched area corresponds to (A+B)-not as shown above. Let’s move on to next
part of the fourth example
The other way of looking at a Venn diagram with overlapping circles is to look at just the
part common to both A and B, the double hatched area below left. The Boolean expression
for this common area corresponding to the AND function is AB as shown below right. Note
that everything outside of double hatched AB is AB-not.

Note that some of the members of A, above, are members of (AB)’. Some of the members
of B are members of (AB)’. But, none of the members of (AB)’ are within the doubly
hatched area AB.

We have repeated the second example above left. Your fifth example, which you previously
sketched, is provided above right for comparison. Later we will find the occasional element,
or group of elements, totally contained within another group in a Karnaugh map.

Next, we show the development of a Boolean expression involving a complemented variable


below.
Example: (above)

Show a Venn diagram for A’B (A-not AND B).

Solution:

Starting above top left we have red horizontal shaded A’ (A-not), then, top right, B. Next,
lower left, we form the AND function A’B by overlapping the two previous regions. Most
people would use this as the answer to the example posed. However, only the double
hatched A’B is shown far right for clarity. The expression A’Bis the region where
both A’ and B overlap. The clear region outside of A’B is (A’B)’, which was not part of the
posed example.

Let’s try something similar with the Boolean OR function.

Example:

Find B’+A

Solution:

Above right we start out with B which is complemented to B’. Finally we overlay A on top
of B’. Since we are interested in forming the OR function, we will be looking for all hatched
area regardless of hatch style. Thus, A+B’ is all hatched area above right. It is shown as a
single hatch region below left for clarity.

Example:

Find (A+B’)’

Solution:

The green 45o A+B’ hatched area was the result of the previous example. Moving on to a
to,(A+B’)’ ,the present example, above left, let us find the complement of A+B’, which is
the white clear area above left corresponding to (A+B’)’. Note that we have repeated, at
right, the AB’ double hatched result from a previous example for comparison to our result.
The regions corresponding to (A+B’)’ and AB’ above left and right respectively are
identical. This can be proven with DeMorgan’s theorem and double negation.

This brings up a point. Venn diagrams don’t actually prove anything. Boolean algebra is
needed for formal proofs. However, Venn diagrams can be used for verification and
visualization. We have verified and visualized DeMorgan’s theorem with a Venn diagram.

Example:

What does the Boolean expression A’+B’ look like on a Venn Diagram?
Solution: above figure

Start out with red horizontal hatched A’ and blue vertical hatched B’ above. Superimpose the
diagrams as shown. We can still see the A’ red horizontal hatch superimposed on the other
hatch. It also fills in what used to be part of the B (B-true) circle, but only that part of
the B open circle not common to the A open circle. If we only look at the B’ blue vertical
hatch, it fills that part of the open A circle not common to B. Any region with any hatch at
all, regardless of type, corresponds to A’+B’. That is, everything but the open white space in
the center.

Example:

What does the Boolean expression (A’+B’)’ look like on a Venn Diagram?

Solution: above figure, lower left

Looking at the white open space in the center, it is everything NOT in the previous solution
of A’+B’, which is (A’+B’)’.

Example:

Show that (A’+B’)’ = AB

Solution: below figure, lower left


We previously showed on the above right diagram that the white open region is (A’+B’)’.
On an earlier example we showed a doubly hatched region at the intersection (overlay)
of AB. This is the left and middle figures repeated here. Comparing the two Venn diagrams,
we see that this open region , (A’+B’)’, is the same as the doubly hatched region AB (A
AND B). We can also prove that (A’+B’)’=AB by DeMorgan’s theorem and double negation
as shown above.

We show a three variable Venn diagram above with regions A (red horizontal), B (blue
vertical), and, C(green 45o). In the very center note that all three regions overlap representing
Boolean expression ABC. There is also a larger petal shaped region where A and B overlap
corresponding to Boolean expression AB. In a similar manner A and C overlap producing
Boolean expression AC. And B and C overlap producing Boolean expression BC.

Looking at the size of regions described by AND expressions above, we see that region size
varies with the number of variables in the associated AND expression.

 A, 1-variable is a large circular region.


 AB, 2-variable is a smaller petal shaped region.
 ABC, 3-variable is the smallest region.
 The more variables in the AND term, the smaller the region.
Week 10 -12: Know the fundamentals of Boolean Algebra

Boolean algebra is used to analyse and simplify the digital (logic) circuits. It uses only
the binary numbers i.e. 0 and 1. It is also called as Binary Algebra or logical Algebra.
Boolean algebra was invented by George Boole in 1854.

Rule in Boolean algebra

Following are the important rules used in Boolean algebra.


 Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW.
 Complement of a variable is represented by an overbar (-). Thus,
complement of variable B is represented as . Thus if B = 0 then = 1 and B = 1
then = 0.
 ORing of the variables is represented by a plus (+) sign between them. For
example ORing of A, B, C is represented as A + B + C.
 Logical ANDing of the two or more variable is represented by writing a dot
between them such as A.B.C. Sometime the dot may be omitted like ABC.

Boolean Laws

There are six types of Boolean Laws.

Commutative law

Any binary operation which satisfies the following expression is referred to as


commutative operation.

Commutative law states that changing the sequence of the variables does not have any
effect on the output of a logic circuit.

Associative law

This law states that the order in which the logic operations are performed is irrelevant
as their effect is the same.
Distributive law

Distributive law states the following condition.

AND law

These laws use the AND operation. Therefore they are called as AND laws.

OR law

These laws use the OR operation. Therefore they are called as OR laws.

Inversion law

This law uses the NOT operation. The inversion law states that double inversion of a
variable results in the original variable itself.

Theorems

De Morgan has suggested two theorems which are extremely useful in Boolean
Algebra. The two theorems are discussed below.

Theorem 1
 The left hand side (LHS) of this theorem represents a NAND gate with
inputs A and B, whereas the right hand side (RHS) of the theorem represents an OR
gate with inverted inputs.
 This OR gate is called as Bubbled OR.
Table showing verification of the De Morgan's first theorem −

Theorem 2

 The LHS of this theorem represents a NOR gate with inputs A and B,
whereas the RHS represents an AND gate with inverted inputs.
 This AND gate is called as Bubbled AND.
Table showing verification of the De Morgan's second theorem −
Week 13 – 15: Understand basic digital functions

5.1 How YES/NO, TRUE/FALSE, ON/OF can be coded by ‘1’ and ‘0’

A bit (binary digit) is the smallest unit of data that a computer can process and store. A
bit is always in one of two physical states, similar to an on/off light switch. The state is
represented by a single binary value, usually a 0 or 1. However, the state might also be
represented by yes/no, on/off or true/false. Bits are stored in memory through the use
of capacitors that hold electrical charges. The charge determines the state of each bit,
which, in turn, determines the bit's value.

Although a computer might be able to test and manipulate data at the bit level, most
systems process and store data in bytes. A byte is a sequence of eight bits that are
treated as a single unit. References to a computer's memory and storage are always in
terms of bytes. For example, a storage device might be able to store 1 terabyte (TB) of
data, which is equal to 1,000,000 megabytes (MB). To bring this into perspective, 1
MB equals 1 million bytes, or 8 million bits. That means a 1 TB drive can store 8
trillion bits of data.

5.2 Logic Gates

Logic gates are the basic building blocks of any digital system. It is an electronic
circuit having one or more than one input and only one output. The relationship
between the input and the output is based on certain logic. Based on this, logic
gates are named as AND gate, OR gate, NOT gate etc.

AND Gate

A circuit which performs an AND operation is shown in figure. It has n input (n >=
2) and one output.
The AND gate is one of the digital system's primary or fundamental logic gates. A
logic gate is a physical device that performs a logical operation in one or more logical
fain-in or inputs and produces a logical output. The output of a "AND Gate" only
returns "HIGH" when all the inputs are "HIGH".
Figure 1.4 Logic diagram of AND gate

Table 1.16 Truth Table of AND Gate

The AND gate truth table is for the two fan-in or inputs, A and B. It has only
one output as Y. The output is logic '0' if any inputs A and B are LOW (logic
'0'). However, the output is 1 only when all the inputs are 1. The AND gate
truth table is as follows:

OR Gate

The OR gate will have two or more inputs but only one output. A logical OR gate
function effectively finds the maximum between two binary digits, such as the
complementary AND function finds the minimum.

A circuit which performs an OR operation is shown in figure. It


has n input (n >= 2) and one output.
Figure 1.5 Logic diagram of OR gate

Table 1.17 Truth Table of OR gate

The OR gate truth table is a table that displays the output state based on the various
combinations of input states. It demonstrates how an OR logic gate works. The truth
table lists the output of a particular digital logic circuit for all the possible
combinations of its inputs. For example, the truth table of a 2 input OR gate can be
represented as:

NOT Gate

NOT gate is also known as Inverter. It has one input A and one output Y.
Figure 1.6 Logic diagram of NOT gate

Table 1.18 Truth Table of NOT gate

NAND Gate

A NOT-AND operation is known as NAND operation. It has


n input (n >= 2) and one output.

Figure 1.7 Logic diagram of NAND gate

Table 1.19 Truth Table of NAND gate


NOR Gate

A NOT-OR operation is known as NOR operation. It has n input (n >= 2)


and one output.

Figure 1.8 Logic diagram of NOR gate

Table 1.20 7Truth Table of NOR gate


XOR Gate

XOR or Ex-OR gate is a special type of gate. It can be used in the


half adder, full adder and subtractor. The exclusive-OR gate is
abbreviated as EX-OR gate or sometime as X-OR gate. It has n
input (n >= 2) and one output.

Figure 1.9 Logic diagram of XOR gate


Table 1.21 Truth Table of XOR gate

XNOR Gate

XNOR gate is a special type of gate. It can be used in the half


adder, full adder and subtractor. The exclusive-NOR gate is
abbreviated as EX-NOR gate or sometime as X-NOR gate. It has
n input (n >= 2) and one output.

Figure 1.10 Logic

diagram of XNOR

gate Table 1.22 Truth

Table of XNOR gate

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy