You are on page 1of 37

 

Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic Name:
Number Systems and code>
<UO1a.1.><study Material>

<Course Expert: <Date:03/07/2020> <Mentor Mr. K. P. Akole>


Mrs. Rita Vora> <Co-ordinator Mrs. Nirmala Kamble>

Key words Learning Objective:: To relate Digital Techniques


Signal, Analog with Communication systems, Industrial process
Signal, Digital control Medical equipment’s, Military systems
Signal,
Applications
Key Questions Concept Map

Give number of
states in a
digital signal

Do You know
the
representation
of Digital signal
and Analog
signal?

Introduction to Digital Systems: Key Definitions


Most modern electronic devices such as mobile Signal
telephones and computers depend on digital A signal is an electromagnetic or electrical current that is used
electronics. In fact, most electronics about the for carrying data from one system or network to another. The
home and in industry depend on digital electronics signal is a function that conveys information about a
Solved word to work. phenomenon
Problem Digital electronics normally based on ‘logic circuits.
These circuits depend on pulses of electricity to Analog Signal
Give make the circuit work. For instance, if current is Analog signal is a continuous signal in which one time-varying
thedifference present - this is represented as ‘1’. If current is not quantity represents another time-based variable. These kind of
between present, this is represented as ‘0’. Digital signals works with physical values and natural phenomena
analog signal electronics is based on a series of 1s and 0s. such as earthquake, frequency, volcano, speed of wind,
and digital weight, lighting, etc.
signal.                                    ( Cont. on next page) Digital Signal
A digital signal is a signal that is used to represent data as a
Analog signal sequence of separate values at any point in time. It can only
have take on one of a fixed number of values. This type of signal
continuous represents a real number within a constant range of values.
values while  
Digital signals
have discreet
values.
Application of Digital Systems: Link to YouTube/ OER/ video
 Computers, https://nptel.ac.in/courses/108/105/108105132/
 Digital watches,
 Mobile phones, 
 Military application,
 Medical Equipment

A good example of a digital electronic system is a mobile phone. As you speak into the phone, the digital electronic circuits it contains
converts your voice into a series of electronic pulses (or 1s and 0s). These are transmitted and the receiving mobile phone then converts
the digital pulses back into your voice. Digital circuits are used because they are efficient and work well, also, digital signals are easier to
transmit than actual sound (for example a person’s voice)

Application of Digital Circuits

Digital circuits and systems can be found in almost every field of electronics. In communications, the principles of digital electronics are
found in satellites, telephone switching and transmission networks, and navigation systems. Digital circuits in the area of consumer
electronics are found in compact discs, VCRs, and television. Process controls in industrial applications, and electronic systems used in
medicine have benefited greatly from advances in digital electronics.

Signal: 
A signal is an electromagnetic or electrical current that is used for carrying data from one system or network to another. The signal is a
function that conveys information about a phenomenon.
In electronics and telecommunications, it refers to any time-varying voltage that is an electromagnetic wave which carries information.
A signal can also be defined as an observable change in quality such as quantity
 Analog Signal : 

Analog signal is a continuous signal in which one time-varying quantity represents another time-based variable. These kind of signals
works with physical values and natural phenomena such as earthquake, frequency, volcano, speed of wind, weight, lighting, etc.
 
 
 
Digital Signal:

A digital signal is a signal that is used to represent data as a sequence of separate values at any point in time. It can only take on one of a
fixed number of values. This type of signal represents a real number within a constant range of values.
Characteristics of Analog Signal
Here, are essential characteristics of Analog Signal

 These types of electronic signals are time-varying


 Minimum and maximum values which is either positive or negative.
 It can be either periodic or non-periodic.
 Analog Signal works on continuous data.
 The accuracy of the analog signal is not high when compared to the digital signal.
 It helps you to measure natural or physical values.
 Analog signal output form is like Curve, Line, or Graph, so it may not be meaningful to all.

Characteristics of Digital Signals


Here, are essential characteristics of Digital signals

 Digital signal are discreet signals


 This type of electronic signals can be processed and transmitted better compared to analog signal.
 Digital signals are versatile, so it is widely used.

The accuracy of the digital signal is better than that of the analog signal

 
 
 
 

Analog Digital

An analog signal is a continuous signal that represents physical Digital signals are time separated signals which are generated
measurements. using digital modulation.

It is denoted by sine waves It is denoted by square waves

It uses a continuous range of values that help you to represent Digital signal uses discrete 0 and 1 to represent information.
information.

Temperature sensors, FM radio signals, Photocells, Light sensor, Computers, CDs, DVDs are some examples of Digital signal.
Resistive touch screen are examples of Analog signals.

The analog signal bandwidth is low The digital signal bandwidth is high.

Analog signals are deteriorated by noise throughout transmission Relatively a noise-immune system without deterioration
as well as write/read cycle. during the transmission process and write/read cycle.
Analog hardware never offers flexible implementation. Digital hardware offers flexibility in implementation.

It is suited for audio and video transmission. It is suited for Computing and digital electronics.

Processing can be done in real-time and consumes lesser It never gives a guarantee that digital signal processing can be
bandwidth compared to a digital signal. performed in real time.

Analog instruments usually have s scale which is cramped at lower Digital instruments never cause any kind of observational
end and gives considerable observational errors. errors.

Analog signal doesn't offer any fixed range. Digital signal has a finite number, i.e., 0 and 1.

 
 
 
 
 
 
 
Advantages of Analog Signals
Here, are pros/benefits of Analog Signals

 Easier in processing
 Best suited for audio and video transmission.
 It has a low cost and is portable.
 It has a much higher density so that it can present more refined information.
 Not necessary to buy a new graphics board.
 Uses less bandwidth than digital sounds
 Provide more accurate representation of a sound
 It is the natural form of a sound.

Advantages of Digital Signals


Here, are pros/advantages of Digital Signals:

 Digital data can be easily compressed.


 Any information in the digital form can be encrypted.
 Equipment that uses digital signals is more common and less expensive.
 Digital signal makes running instruments free from observation errors like parallax and approximation errors.
 A lot of editing tools are available
 You can edit the sound without altering the original copy
 Easy to transmit the data over networks

Disadvantages of Analog Signals


Here are cons/drawback of Analog Signals:

 Analog tends to have a lower quality signal than digital.


 The cables are sensitive to external influences.
 The cost of the Analog wire is high and not easily portable.
 Low availability of models with digital interfaces.
 Recording analog sound on tape is quite expensive if the tape is damaged
 It offers limitations in editing
 Tape is becoming hard to find
 It is quite difficult to synchronize analog sound
 Quality is easily lost
 Data can become corrupted
 Plenty of recording devices and formats which can become confusing to store a digital signal
 Digital sounds can cut an analog sound wave which means that you can't get a perfect reproduction of a sound
 Offers poor multi-user interfaces

Disadvantage of Digital Signals

 Sampling may cause loss of information.


 A/D and D/A demands mixed-signal hardware
 Processor speed is limited
 Develop quantization and round-off errors
 It requires greater bandwidth
 Systems and processing is more complex.

 
 
KEY DIFFERENCES:

 An analogsignal is a continuous signal whereas Digital signals are time separated signals.
 Analog signal is denoted by sine waves while It is denoted by square waves
 Analog signal uses a continuous range of values that help you to represent information on the other hand digital signal uses
discrete 0 and 1 to represent information.
 The analog signal bandwidth is low while the bandwidth of the digital signal is high.
 Analog instruments give considerable observational errors whereas Digital instruments never cause any kind of observational
errors.
 Analog hardware never offers flexible implementation, but Digital hardware offers flexibility in implementation.
 Analog signals are suited for audio and video transmission while Digital signals are suited for computing and digital electronics.
 
Key Take away from this UO:
Concept of Analog signal and Digital Signal
Comparison of Analog Signal and Digital Signal.

Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic Name:
Number Systems and code>
<UO1a.2.><study Material>

Course Expert: Date:07/07/2020 Mentor: Mr. K. P. Akole


Mrs. Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective: To convert the given number from one Numbers have positional importance
Number System , number system to another such as Binary, Decimal, octal,
Radix , Decimal , Hexadecimal.
Binary ,
Hexadecimal,
Octal

Key Questions Concept Map

Do You know the


importance of
Number System?

Name the
number system
used in
Computers.

Number Systems: Key Definitions


The number system is a way to represent or express numbers. It Number Systems:
is the mathematical notation for representing numbers of a The number system is a way to represent or
given set by using digits or other symbols in a consistent express numbers
manner. A digital system can understand positional number  
Solved word system only when there are few digits and symbols that Radix: The number of values that a digit can
Problem represents different values depending on the position they have is equal to the base  or Radix of the
occupy in the number. Hence Number system provides a unique system
Give the radix of representation of every number and represents the arithmetic
the four number and algebraic structure of the figures.
systems

The radix for    (Cont. on next page)


Decimal number
system is 10, for
Binary number
system is 2, for
Hexadecimal
number system is Application of Number Systems Link to YouTube/ OER/ video
16 and Octal  Computers
number system is  Mathematical algorithm and calculations https://www.mathsisfun.com/binary-
8.  Digital Systems number-system.html
 Microprocessors

The value of any digit in a number can be determined by:


• The digit
• Position of digit in the number before and after decimal point
• The base of the number system

RADIX or BASE:
In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers. For
example, for decimal system (the most common system in use today) the radix (base number) is 10, because it uses ten digits i.e. from 0
to 9 in which every digit can have 10 distinct values (0, 1, 2…….9).
The largest value of a digit is always one less than the base: For example, the largest digit in a decimal system is 9 (one less than the
base 10).
The position (place) of every digit represents a different multiple of base i.e. the number have positional importance: For example,

consider the decimal number (349.25)   shown in Figure below:


10

Hence, we can implement a common rule for all the numbering systems, for a general number we have to multiply each of digit by some

power of base or radix as show in figure :

.TYPES OF NUMBER SYSTEM

There are various types of the number system, the four most common number system types are:
1. Decimal number system (Base-10)
2. Binary number system (Base-2)
3. Octal number system (Base-8)
4. Hexadecimal number system (Base-16)

These number systems are explained below in detail.


Decimal Number System
The number system having digit from 0, 1, 2……9 is known as a decimal number system because total ten digits are involved. The base of
the decimal number system is 10.
Characteristics of a Decimal Number System

 The base or radix of Decimal number system is 10. 


 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 each place of a digit represents a different multiple of 10. These multiples are called as weighted
values. 
 The digits having successive position to the left side of the decimal point have weights of 10 , 10 , 10 , 10 and so on. Similarly,
0 1 2 3

the digits having successive position to the right side of the decimal point have weights of 10 , 10 , 10 and so on. That means,
-1 -2 -3

each position has specific weight, which is power of base 10. 


 The weighted values for different positions of a digit in decimal number system is shown in figure:
 
Most Significant Digit (MSD): The leftmost digit having the highest weight is called as the most significant digit of a number.
Least Significant Digit (LSD): The rightmost digit having the lowest weight is called as the least significant digit of a number.
Example
1) Represent the decimal number 1358.246 in terms of power of 10.
Solution: 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 10 , 10 , 0 1

10 and 10 respectively. Similarly, the digits 2, 4 and 6 have weights of 10 , 10 and 10 respectively.
2 3 -1 -2 -3

Hence, we write it as
1358.246 = (1 × 10 ) + (3 × 10 ) + (5 × 10 ) + (8 × 10 ) + (2 × 10 ) +(4 × 10 ) + (6 × 10 ).
3 2 1 0 -1 -2 -3

 
 
Binary Number System 
The modern digital systems do not process decimal number rather they work with another number system known as a binary number
system whose radix or base is 2  and its elements or digits will be 0 & 1 only. This system is known as binary number system as its radix
is 2. The digits 0 & 1 of this system are known as bits. This number system finds extensive use in digital electronics. 
Characteristics of Binary Numbers System 

 The base or radix of this number system is 2.


 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 digits having successive position to the left side of the binary point have weights of 2 , 2 , 2 , 2 and
0 1 2 3

so on. Similarly, the digit having successive positions to the right of the binary point have weights of 2 , 2 , 2 and so on, means
-1 -2 -3

each position has specific weight, which is power of base 2. 


 The weighted values for different positions of a digit in binary number system is shown in figure:

 The left most bit in a given binary number with the highest weight is called as Most significant bit (MSB) whereas the right
most bit in a given binary number with lowest weight is called as least significant bit (LSB).

 The binary number system requires a very long string of 1’s and 0’s to represent a decimal number hence it is a drawback of
binary number system.

The table below illustrates the counting from 0 to 15 in binary system with their decimal equivalents

Binary number Decimal equivalent


0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
Example 
1. Represent the binary number1101.011 in terms of power of 2.
Solution: 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 2 , 2 , 2 , 2 respectively. Similarly, the digits 0, 1 and 1 of fractional part have weights of 2 , 2 , 2 respectively.
0 1 2 3 -1 -2 -3

Hence, we write it as
1101.011 = (1 × 2 ) + (1 × 2 ) + (0 × 2 ) + (1 × 2 ) + (0 × 2 ) + 
3 2 1 0 -1

(1 × 2 ) + (1 × 2 )
-2 -3

Octal Number System


In the octal number system, the base is 8 and it uses digits from 0 to 7 to represent numbers. Octal number systems are used to reduce
the size of large binary numbers and are commonly used in computer applications. It is important to note that, digital circuits and
computers internally work strictly with the binary structure, and not with octal structure. The octal structure is used only as the
convenience of the user.
Characteristics of Octal Number System

 The base or radix of this number system is 8.


 The largest value of a digit in octal system is 7.
 The part of the number, which lies to the left of the octal 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 digits having successive position to the left side of the octal point have weights of 8 , 8 , 8 , 8 and so
0 1 2 3

on. Similarly, the digit having successive positions to the right of the octal point have weights of 8 , 8 , 8 and so on, means
-1 -2 -3

each position has specific weight, which is power of base 8. 


 The weighted values for different positions of a digit in octal number system is shown in figure:

Example 
3) Represent the octal number 1457.236 in terms of power of 8.
Solution: 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 , 8 , 8 0 1 2

and 8 respectively. Similarly, the digits 2, 3 and 6 have weights of 8 , 8 , 8 respectively.


3 -1 -2 -3

Hence, we write it as
1457.236 = (1 × 8 ) + (4 × 8 ) + (5 × 8 ) + (7 × 80) + (2 × 8- ) +(3 × 8 ) + (6 × 8 )
3 2 1 1 -2 -3

Hexadecimal Number System


In the hexadecimal system, numbers are written or represented with base 16. In the hex system, the numbers are first represented just
like in decimal system i.e. from 0 to 9. Then, the numbers are represented using the alphabets from A to F. The size of the hexadecimal
number is much shorter than the binary number which makes them easy to write and remember. These numbers are used extensively
in microprocessor/micro-controller work.
The below-given table shows the representation of numbers in the hexadecimal number system.
Hexadecimal
1 2 3 4 5 6 7 8 9 A B C D
E F
Decimal
1 2 3 4 5 6 7 8 9 10 11 12 13
14 15
Characteristics of Hexadecimal Number System
The base or radix of this number system is 16.
The largest value of a digit in hexadecimal system is 15 and it is represented by F.
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 binary point is known as fractional part.
In this number system, the digits having successive position to the left side of the hexadecimal point have weights of 16 , 16 , 16 , 16 and
0 1 2 3

so on. Similarly, the digit having successive positions to the right of the hexadecimal point have weights of 16 , 16 , 16 and so on, means
-1 -2 -3

each position has specific weight, which is power of base 16. 


The weighted values for different positions of a digit in hexadecimal number system is shown in figure:

 Example
4) Represent the Hexadecimal number 6DE in terms of power of 16.
Solution: Integer part of this number is 6DE and there is no fractional part. Therefore digits E, D and 6 have weights of 16 , 16 , and 16
0 1 2

respectively. 
Hence, we write it as
6DE = (6 × 16 ) + (13 × 16 ) + (14 × 16 )
2 1 0

RELATION BETWEEN BINARY, DECIMAL, OCTAL AND HEXADECIMAL 

Decimal Binary Hexadecimal Octal


(base 10) (base 2) (base 16) (base 8)

0 0000 0 0

1 0001 1 1

2 0010 2 2

3 0011 3 3

4 0100 4 4

5 0101 5 5

6 0110 6 6

7 0111 7 7

8 1000 8 10

9 1001 9 11

10 1010 A 12

11 1011 B 13

12 1100 C 14

13 1101 D 15

14 1110 E 16

15 1111 F 17

The table above shows relationship between decimal, binary, octal, and hexadecimal numbers from 0 to 15.  
 
CONVERSION OF NUMBER SYSTEMS
The conversion of a number from one number system to another is achieved by expanding the given number to its power series and
adding all the terms.
If the given number includes the radix point, then it is necessary to separate the number into an integer part and a fraction part and
then each part should be converted separately. 
Conversion from Radix “r” to Decimal System
The general procedure for conversion of a number system to decimal system is given below:
Steps to Follow:
1. Note down the given Number.
2. Write down the weights corresponding to different positions.
3. Multiply each digit in the given number with the corresponding weight to obtain product numbers.
4. Add all the product numbers to get the decimal equivalent.
The following examples demonstrate the conversion of binary, octal and hexadecimal number system to its decimal equivalent:
Ex 1:  Convert the binary number 1011.01 to its decimal equivalent.
Solution: 1011.01
        = (1 x 2 ) + (0 x 2 ) + (1 x 2 ) + (1 x 2 ) + (0 x 2 ) + (1 x 2 )
3 2 1 0 -1 -2

        = 8 + 0 + 2 + 1 + 0 + 1/4
      Ans:  = (11.25)10

Ex 2:  Convert the octal number (314) to its decimal equivalent.


8

Solution: 314
        = (3 x 8 ) + (1 x 8 ) + (4 x 8 ) 
2 1 0

        = 192 + 8 + 4
     Ans:   = (204)
10

Conversion from Decimal to Other Number System (Binary, octal and Hexadecimal

The general procedure for conversion of a decimal number system to any other system is given below:
Steps to Follow:

1. Note down the given Number. Divide the number by the base ‘r’ until there is nothing left, noting the remainder from each step. List
the remainder values in reverse order from bottom to top to find the equivalent.
2. If the given decimal number consists a decimal point, then we have to first separate out the integer and fractional part. Then convert
them separately to the desired radix and combine the converted parts to obtain the complete converted number. 

3. For Integer part:


Divide integer part of the decimal number by base ‘r’ and note down the remainder, continue to divide the quotient until there is
nothing left, noting the remainder from each step. List the remainder values in reverse order from bottom to top to find the equivalent.

4. For Fractional part: 


i. Multiply the fractional part of decimal number by the base ‘r’. Note down the carry generated in the multiplication as MSD. 
ii. Now multiply only the fractional number of the product from previous step by the base ‘r’ and note down the carry as the next
bit to MSD. 
iii. Repeat above steps upto the end, the last carry represents LSD now list the values from top to bottom to get converted
number.    

The following examples demonstrate the conversion of decimal number system to other system

Ex 1Convert (35) to binary10 


    Ex 2  Convert  (965.125)10  to Octal

Key Take away from this UO:

Types of Number System :Decimal, Binary, Hexadecimal and Octal


Conversion of one number system to the other.

  
Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic
Name: Number Systems and code>
<UO1b.1.><study Material>

Course Expert: Mrs Rita Vora Date: 11/07/2020 Mentor: Mr. K. P. Akole
Co-ordinator: Mrs Nirmala
Kamble
Key words Learning Objective:. Rules :
Binary Addition, Binary  To perform binary arithmetic operations: Binary Binary  Addition
Subtraction, Binary Multiplication, Addition, Subtraction, Multiplication and Division 0+0=0
Binary Division. 0+1=1
1+0=1
Key Questions Concept Map 1 + 1 = Sum  = 0, Carry = 1
Binary Subtraction
Do You know the rules for binary
addition and binary subtraction?

Do  you know the rules of binary


multiplication?
0-0=0
0 - 1 = Diff = 1,Borrow = 1
1-0=1
Binary Multiplication
0 x 0 =0
0 x 1 =0
1 x 0 =0
Binary arithmetic: Key Definitions
Binary arithmetic: 
Solved word Problem Binary arithmetic is essential part of all the digital The arithmetic operations
computers and many other digital system such as addition,
Perform the following binary operation: subtraction, multiplication,
1)  (110) +(001) and division are performed
2 2
The arithmetic operations such as addition, subtraction,
  in binary number systems.
multiplication, and division are performed in binary
 1 1 0 number system.
+001
 
 1 1  1

2) (110) -(010)
2 2

  1 1 0
-010
  1 0 0

Application of Number Systems Link to YouTube/ OER/


 Computers Systems video
 Arithmetic Logic Unit
 Adders http://
 Subtractors people.sju.edu/
 Digital Systems ~ggrevera/arch/slides/

Binary arithmetic includes the basic arithmetic operations of addition, subtraction, multiplication and division. Certain  rules are to be
applied when these operations  are performed on binary numbers. 
Binary Addition: Binary addition is performed in the same way as addition in the decimal-system and is, in fact, much easier to master.
Binary addition obeys the following four basic rules:

In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given column and a carry of 1 over to the next
column.

Example – Binary Addition

Example 1: (5) +(4)                                                                                         Example 2: (1011) +(1101)


10 10 2 2

Binary Subtraction

Subtraction and Borrow, these two words will be used very frequently for the binary subtraction. There are four rules of binary
subtraction

Cas A    -    B Difference Borrow


e
1 0    -    0 0 0
2 1    -    0 1 0
3 0    -    1 1 1
4 1    -    1 0 1

When doing subtracting, it is sometimes necessary to borrow from the next higher-order column. The only it will be necessary to
borrow is when we try to subtract a 1 from a 0. In this case a 1 is borrowed from the next higher-order column, which leaves a 0 in that
column and creates a (10) that is  2 in the column being subtracted. The following examples illustrate binary subtraction.
2

Examples – Binary subtraction

Example 1: (14) -(9)                                                                                         Example 2: (1011011) –(10010)


10 10 2 2
Binary Multiplication

Binary multiplication is similar to decimal multiplication. It is simpler than decimal multiplication because only 0s and 1s are involved.
There are four rules of binary multiplication

Examples- Binary multiplication

Example 1 : (101) x (11)


2 2 Example 2:  (26) x (12)
10 10

Binary Division

Binary division is similar to decimal division. It is called as the long division procedure
Examples-Binary Division

Example 1: (11100) divide by (100)


2 2 Example 2: (11001) divide by (101)
2 2

Key Take away 

Four Binary arithmetic operations: Binary Addition, Binary Subtraction, Binary Multiplication, Binary Division.
.

 
 
 Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic Name:
Number Systems and code>
<UO1b.2.><study Material>

Course Expert: Date:14/07/2020 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:.


To apply 1's complement method for subtraction
1's complement

subtraction

Key Questions Concept Map

Q1. Define 1's


complement

Q2. What is the


first thing you
must do in order
to solve the A ones' complement system or ones' Key Definitions
subtraction complement arithmetic is a system in which 1’s complement :
problem negative numbers are represented by the inverse The 1’s complement of a binary number is defined as the value
(11)  – (4)  using
10 10
of the binary representations of their obtained by inverting all the bits in the binary representation
1's complement corresponding positive numbers. of the number (swapping 0s for 1s and vice versa).
representation?
Solved word  In such a system, a number is negated
Problem (converted from positive to negative or vice
versa) by computing its ones' complement.

.  An N-bit ones' complement numeral system can


Q2. Subtract only represent integers in the range −(2 −1) to
N−1

(1110) - (1001)
2 2
2 −1 .
N−1

using 1's
complement.
Solution: 1’s
complement of i)
(1001) is (0110) .
2 2

ii)(1110) 2

+(0110) = 2
Application of 1’s complement method Link to YouTube/ OER/ video
1 0100.  Computers
iii) Carry is 1 so  Adders https://www.youtube.com/watch?v=kx8DFNf6pQU
add to 0100=  Subtractors
0101  Digital Systems
So Answer is
(0101) 2

1’s Complement of a Binary Number:


 The 1’s complement of a binary number is important because they can be used for representation of negative numbers.
 The 1’s complement of a number can be obtained simply by changing all 1’s to 0’s and 0’s to 1’s.
 The I’s complement of a number is found by inverting all the bits in that number. This is called as  taking complement.
 This complemented value represents the negative of the original number. The 1’s complement system is very easy to
implement using inverters.

Example: Find 1’s complement of the given binary numbers.


                         a) 101010       b)110101

Solution:  a)101010            b)110101


                    ↓↓↓↓↓↓               ↓↓↓↓↓↓                                                                      
                    010101               001010 

There is a simple algorithm to convert a binary number into 1’s complement. To get 1’s complement of a binary number, simply invert
the given number.  You can simply implement logic circuit using only NOT gate for each bit of Binary number input. Implementation of
logic circuit of 4-bit 1’s complement is given as following below.

Binary number subtraction using 1’s complement can be performed as follows: 


The steps to be followed for subtraction of (A) -(B) where A is the minuend and B is the subtrahend using 1’s complement are:
2 2

Step 1: Find 1’s complement of the subtrahend B.

Step 2: Add 1’s complement of B to A.

Step 3: If final carry is 1 then add it to the result of addition obtained in step 2. The carry is called end around carry. If carry is 1, then the
result of subtraction is (+ve) and in its true form.
Step 4: If the carry produced in step 2 is 0, then the result obtained is (–ve) and in 1’s complement form, so convert it into true form.
Examples  where a smaller number is to be subtracted from a larger number:
i)Perform (9) – (4) using 1’s complement method.
10 10

Solution;
 (9)   =  (1001)
10 2

 (4)   =   (0100)
10 2

Step 1: 1’s complement of (0100) =(1011) 2 2

Step 2:  Add (9) and1’s complement of  (4)


10 10

                                Minuend-                         1 0 0 1
     1’s complement of subtrahend               1 0 1 1
                              Carry over     -🡪     1        0 1 0 0
Step 3: Add the final carry                     +             1
                                                                           0 1 0 1
Answer is positive and in true form 
The Answer is (0101) 2

(iI) (110101)2 – (100101)2


Step 1:      1’s complement of  (10011) is  ( 011010) .  2 2

Step 2:                              Minued -              1 1 0 1 0 1


      1’s complement of subtrahend -     +        0 1 1 0 1 0

                                Carry over🡪     1       0 0 1 1 1 1

Step 3:   Add the final carry                             +                  1

                                                              0 1 0 0 0 0

Answer is positive and in true form


The Answer is (010000) 2

ii) (1011.001) – (110.10)
2 2

Solution:
Step 1: 1’s complement of (0110.100) is (1001.011) 2 2

Step 2:                                  Minued -              1 0 1 1 . 0 0 1

      1’s complement of subtrahend -              1 0 0 1 . 0 1 1

                              Carry over🡪     1       0 1 0 0 . 1 0 0

Step 3: Add the final carry                           +                      1

                                                              0 1 0 0 . 1 0 1

Answer is positive and in true form


The Answer is (0100 .101) 2

Examples  where a larger number is to be subtracted from a smaller number:


i ) (101011) – (111001)
2 2

Solution:
Step 1: 1’s complement of (111001) is (000110) . Hence 2 2

                                
Step 2:    Minued -              1 0 1 0 1 1

                           1’s complement -            0 0 0 1 1 0

                                    Carry is 0       1 1 0 0 0 1
Step 3: Final carry is 0 so answer is negative and in 1’s complement form
So final answer is -(0011100)   (1’s complement of (110001) )
2 2

ii) (10110.01) – (11010.10)


2 2

Solution:
Step  1:  1’s complement of (11010.10) is (00101.01) 2 2

 Step 2:                          Minuend            1 0 1 1 0 . 0 1

                                       1;s complement         0 0 1 0 1 . 0 1

                                         Carry is 0          1 1 0 1 1 . 1 0


Step 3:Final carry is 0 so answer is negative and in 1’s Complement form
So final answer is -(00100.01) (1’s complement of (11011.10) )
2 2
Key Take away:

1’s complement method can be used for subtraction of two numbers in corresponding number systems and is simpler than Binary
Subtraction.

 Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic Name:
Number Systems and code>
<UO1b.3.><study Material>

Course Expert: Mrs Date:17/07/2020 Mentor: Mr. K. P. Akole


Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:.


To apply  2's complement method for
subtraction
 2’s complement

Key Questions Concept Map

Q1. Obtain 2's


complement of
(11001) 2

Q2 Do you know the


extra step we take
when we form the Two's complement is a mathematical Key Definitions
2's complement of a operation on binary numbers, and is an example
2’sComplement of a Binary Number:
negative binary of a radix complement.
number? It is used in computing as a method of signed The 2's complement of binary number is obtained by
number representation. adding 1 to the Least Significant Bit (LSB) of 1's
Solved word Compared to other systems for representing complement of the number.
Problem signed numbers (e.g., ones' complement), two's
complement has the advantage that the
Q1.Subtract (52) - fundamental arithmetic operations of addition,
10
 
(65) using 2's
10
subtraction, and multiplication are identical to
complement. those for unsigned binary numbers (as long as
Solution: the inputs are represented in the same number
(110100) - 2
of bits as the output, and any overflow beyond
(1000001) 2
those bits is discarded from the result). This
1)2’s complement property makes the system simpler to
of 1000001 is implement, especially for higher-precision
0111111 arithmetic
2)0110100 +  
0111111 =1110011
3) carry=0 so Ans is - Application of 2’s complement method Link to YouTube/ OER/ video
ve and in 2’s  Computer number representation
complement form.  Adders https://nptel.ac.in/courses/108/105/108105132/
Hence  Subtractors
Ans=(001101) =(13) 2 10
 Digital Systems

2’sComplement of a Binary Number:

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.

Example-1- 2’s complement of 110 is obtained as: 


Solution:  1’s complement of 110→ 001
2’s complement           =  +1
 010
Example-2 − Find 2’s complement of each 3-bit binary number.

Simply invert each bit of given binary number, then add 1 to LSB of these inverted numbers,

Binary 1’s complement 2’s complement


number

000 111 000

001 110 111

010 101 110

011 100 101

100 011 100

101 010 011

110 001 010

111 000 001

Uses of 2’s Complement Binary Numbers


There are various uses of 2’s complement of Binary numbers, mainly in signed Binary number representation and various arithmetic
operations for Binary numbers, e.g., additions, subtractions, etc. Since 2’s complement representation is unambiguous, so it particularly
useful in Computer number representation.

2’s Complementation in Signed Binary number Representation


Positive numbers are simply represented as simple Binary representation. But if the number is negative then it is represented using 2’s
complement. First represent the number with positive sign and then take 2’s complement of that number.

Example − Let we are using 5 bits registers. The representation of -5 and +5 will be as follows:

+5 is represented as it is represented in sign magnitude method. -5 is represented using the following steps:

(i) +5 = 0 0101

(ii) Take 2’s complement of 0 0101 and that is 1 1011. MSB is 1 which indicates that number is negative.
MSB is always 1 in case of negative numbers.

Range of Numbers −Fork bits register, positive largest number that can be stored is (2 -1) and negative lowest number that can be
(k-1)

stored is -(2 ). (k-1)

The advantage of this system is that 0 has only one representation for -0 and +0. Zero (0) is considered as always positive (sign bit is 0)
in 2’s complement representation. Therefore, it is unique or unambiguous representation

With the help of subtraction by 2’s complement method we can easily subtract two binary numbers.

The operation is carried out by means of the following steps:

Step 1:   At first, 2’s complement of the subtrahend is found.

Step 2: Then it is added to the minuend.

Step 3: If the final carry over of the sum is 1, it is dropped, and the result is positive.

Step 4: If there is no carry over, the two’s complement of the sum will be the result and it is negative.

Examples  where a smaller number is to be subtracted from a larger number:

Preform (54) - (22) using 2’s complement method


10 10

(54) =(110110)
10 2

(22) =(10110)
10 2 

Solution:

The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number of bits in the subtrahend equal to that of
minuend by taking a `0’ in the sixth place of the subtrahend.

Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend.

                          Minuend1  1 0 1 1 0

2’s complement of subtrahend-         1 0 1 0 1 0

Carry over 1       1 0 0 0 0 0      Result of addition

After dropping the carry-over, we get the result of subtraction to be (100000) . 2

ii) (1010.11) – (1001.01)


2 2

Solution:

2’s complement of 1001.01 is 0110.11. Hence

                                 Minuend            1 0 1 0 . 1 1

2’s complement of subtrahend     +      0 1 1 0 . 1 1

                            Carry over      1     0 0 0 1 . 1 0


After dropping the carry-over, we get the result of subtraction as( 1.10) .
2

Examples  where a larger number is to be subtracted from a smaller number:

iii) (10110) – (110100)
2 2

Solution:

2’s complement of 11010 is (00101 + 1) i.e. 00110. Hence

                                  Minuend          1 0 1 1 0

   2’s complement of subtrahend  +     0 0 1 1 0

                    Result of addition -          1 1 1 0 0


As there is no carry over, the result of subtraction is negative and is obtained by writing the 2’s complement of 11100 i.e.(00011 + 1) or
00100.

Hence the difference is – (100) . 2

iv) (10100.01) – (11011.10)


2 2

Solution:

2’s complement of 11011.10 is 00100.10. Hence

                                  Minuend -          1 0 1 0 0 . 0 1

   2’s complement of subtrahend -          0 1 1 0 0 . 1 0

                    Result of addition -          1 1 0 0 0 . 1 1

As there is no carry over the result of subtraction is negative and is obtained by writing the 2’s complement of 11000.11.

Hence the required result is – (00111.01) 2

Key Take away :

 2’s complement of a binary number is obtained by adding 1 to 1’s complement of that number. 
 Negative numbers are represented by 2’s complement of their absolute values. 
 This method is most common method of representing signed integers on computers.

 
 
Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic
Name: Number Systems and code>
<UO1c. 1><study Material>

Course Expert: Mrs Rita Date:21/07/2020 Mentor: Mr. K. P. Akole


Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective: Conversion of Decimal Code to Binary Code, Gray
Code, BCD Code and Excess-3 Code
BCD code To apply code conversion from given number
Excess -3 code system into other specified code such as Gray
Gray code  code, Excess-3 code, and ASCII code.
ASCII code

Key Questions Concept Map

Q1. Define weighted and


non-weighted code.

Q2. Do you know theGray


code is used for error
correction?

Codes Key Definitions


 When numbers, letters or words are represented
by a specific group of symbols, it is said that the BCD code: In this code each decimal digit is
number, letter, or word is being encoded. The represented by a 4-bit binary number. 
group of symbols is called as a code. The digital
Solved word Problem data is represented, stored, and transmitted as Excess-3 Code: The Excess-3 code words are derived
group of binary bits. This group is also called from the 8421 BCD code words by adding (0011)  or 2

Q1. Convert the following as binary code. The binary code is represented by (3)10 to each code word in 8421.
binary number into Gray the number aswell as alphanumeric letter. Gray code: Itis defined as an ordering of the binary
code and Excess-3 code: Numeric codes are used to represent numbers. number system such that each incremental value
110100 , 1111 Alphanumeric codes are used to represent can only differ by one bit.
Gray code of 110100 is characters: Alphabetic letters and numerals.
101110
 
ASCII Code: ASCII Code (American Standard Code for
Excess-3 code is Adding
Information Interchange) is a 7-bit code and can
(33) to (52) which is
represent 2 = 128 possible characters and symbols.
10 10
7

(85) so Answer is 1000


10

0101  
Gray code for 1111 is
1000
 
Excess-3 code is (1111) 2
Application of 1’s complement method Link to YouTube/ OER/ video
=(15) 10.
 Computerapplications
Adding (33) to (15) gives
10 10  Digital communication https://nptel.ac.in/courses/108/105/108105132/
(48)
10  Analog to digital converters click on lecture 28
i.e 0100 1000  Error correction in digital communication
 Rotary and Optical encoders https://www.tutorialspoint.com/
computer_logical_organization/
binary_codes.htm#:~:text=Error%20Correcting
%20Codes-,Weighted%20Codes,a%20group%20of
%20four%20bits.

Classification of binary codes

The codes are broadly categorized into following four categories.

 Weighted Codes
 Non-Weighted Codes
 Reflective Codes
 Sequential Codes
 Alphanumeric Codes
 Error Detecting and correcting  Codes

Weighted Codes

Weighted binary codes are those binary codes which obey the positional weight principle. Each position of the number represents a
specific weight. Several systems of the codes are used to express the decimal digits 0 through 9. In these codes each decimal digit is
represented by a group of four bits. The examples are Binary and BCD code.

Non-Weighted Codes

In this type of binary codes, the positional weights are not assigned. The examples of non-weighted codes are Excess-3 code and Gray
code.

Alphanumeric codes

The alphanumeric codes are the codes that represent numbers and alphabetic characters. Mostly such codes also represent other
characters such as symbol and various instructions necessary for conveying information. An alphanumeric code should at least
represent 10 digits and 26 letters of alphabet i.e. total 36 items. The following three alphanumeric codes are very commonly used for
the data representation.

 American Standard Code for Information Interchange (ASCII).


 Extended Binary Coded Decimal Interchange Code (EBCDIC).
 Hollerith Code.
Reflective Code
It can be observed that in the 2421 and 5211 codes, the code for decimal 9 is the complement of the code for decimal 0, the code for
decimal 8 is the complement of the code for decimal 1, the code for decimal 7 is the complement of the code for decimal 2, the code for
decimal 6 is the complement of the code for decimal 3, the code for decimal 5 is the complement of the code for decimal 4, these codes
are called as reflexive codes.
Sequential Codes
Sequential codes are the codes in which 2 subsequent numbers in binary representation differ by only one digit. The 8421 and Excess-3
codes are examples of sequential codes. 2421 and 5211 codes do not come under sequential codes.
Error detection and Correcting Codes
 
When digital data is transmitted from one system to another system an error my occur due to noise. To maintain the data integrity
between transmitter and receiver ,extra bit or more than one bit are added in the date. These extra bits allow detection and sometimes
correction of error in the data. The data along with the extra bits forms the code.
Codes which allow only detection of errors are called error correction codes and codes which allow detection and correction are called
error detection and correction codes.
 
BCD(Binary coded decimal) Codes
In this code each decimal digit is represented by a 4-bit binary number. 
BCD is a way to express each of the decimal digits with a binary code. 
The positional weights associated to the binary bits in BCD code are 8-4-2-1 with 1 corresponding to LSB and 8 corresponding to MSB.
These weights are actually 2³ 2² 2¹ 2⁰ which are same as those used in normal binary system.

In the BCD, with four bits we can represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to
1001). 
The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.

Example:  convert (35) into BCD 10

3 0011
5 0101
So (35) = (00110101)
10 BCD

Binary to BCD Conversion

Steps

 Step 1 -- Convert the binary number to decimal.

 Step 2 -- Convert decimal number to BCD.

Example − convert (11101)  to BCD. 2

Step 1 − Convert to Decimal

Binary Number − 11101 2

Calculating Decimal Equivalent −

Step Binary Number Decimal Number

Step 1 11101 2 ((1 × 2 ) + (1 × 2 ) + (1 × 2 ) + (0 × 2 ) + (1 × 2 ))


4 3 2 1 0
10

Step 2 11101 2 (16 + 8 + 4 + 0 + 1) 10


Step 3 11101 2 29 10

Binary Number − 11101  = Decimal Number − 29


2 10

Step 2 − Convert to BCD

Decimal Number − 29 10

Calculating BCD Equivalent. Convert each digit into groups of four binary digits equivalent.

Step Decimal Number Conversion

Step 1 2910 0010  1001 2 2

Step 2 2910 00101001 BCD

Result

(11101) =  (00101001)
2 BCD

BCD to Binary Conversion

Steps

 Step 1 -- Convert the BCD number to decimal.

 Step 2 -- Convert decimal to binary.

Example − convert (00101001)  to Binary. BCD

Step 1 - Convert to BCD

Step BCD Number Conversion

Step 1 (00101001) BCD 0010  1001 2 2

Step 2 (00101001) BCD 2  910 10

Step 3 (00101001) BCD 29 10

BCD Number − (00101001) BCD

Calculating Decimal Equivalent. Convert each four digits into a group and get decimal equivalent for each group.

BCD Number − (00101001)  = Decimal Number − 29


BCD 10

Step 2 - Convert to Binary

Used long division method for decimal to binary conversion.

Decimal Number − 29 10
Calculating Binary Equivalent −

Step Operation Result Remainder

Step 1 29 / 2 14 1

Step 2 14 / 2 7 0

Step 3 7/2 3 1

Step 4 3/2 1 1

Step 5 1/2 0 1

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 − 29  = Binary Number − 11101


10 2

Result

(00101001) = (11101)
BCD 2

Advantages of BCD Codes

 It is similar to decimal system.

 We need to remember binary equivalent of decimal numbers 0 to 9 only.


Disadvantages of BCD Codes

 The addition and subtraction of BCD have different rules.

 The BCD arithmetic is little more complicated.

 BCD needs more number of bits than binary to represent the decimal number. So BCD is less efficient than binary.

Excess-3 code

The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express decimal numbers. 

The Excess-3 code words are derived from the 8421 BCD code words by adding (0011)  or (3)10 to each code word in 8421
2

It is a sequential code because any code word can be obtained by adding binary 1 to its previous code.

 In excess-3 code we get 9’s complement by just complementing each bit hence it is called self -complimenting code. The excess-3
codes are obtained as follows −
For example, to convert 15 to an excess-3 code, first 3 to be added to each digit as shown below .

BCD to Excess-3  Conversion

Steps

 Step 1 -- Convert BCD to decimal.

 Step 2 -- Add (3)  to this decimal number.


10

 Step 3 -- Convert into binary to get excess-3 code.

Example − convert (0110)  to Excess-3.


BCD

Step 1 − Convert to decimal

(0110)  = 6
BCD 10

Step 2 − Add 3 to decimal

(6)  + (3)  = (9)


10 10 10

Step 3 − Convert to Excess-3

(9)  = (1001)
10 2
Result

(0110) = (1001)
BCD XS-3

Excess-3 to BCD Conversion

Example − convert (10011010)  to BCD. XS-3

Steps

 Step 1 -- Subtract (0011)  from each 4 bit of excess-3 digit to obtain the corresponding BCD code.
2

Example − convert (10011010)  to BCD. XS-3

Given XS-3 number   1 0 0 1 1 0 1 0 


Subtract (0011) -  0 0 1 1 0 0 1 1
2

                                            1 1       1 1 1 
 --------------------
               BCD = 0 1 1 0 0 1 1 1

Result

(10011010) = (01100111)
XS-3 BCD

Gray code
It is also known as Cyclic Code, Reflected Binary Code (RBC), Reflected Binary (RB) or Grey code – is defined as an ordering of the binary
number system such that each incremental value can only differ by one bit.
 
In gray code, while traversing from one step to another step only one bit in the code group changes. That is to say that two adjacent
code numbers differ from each other by only one bit.
 
Gray code is the most popular of the unit distance codes, but it is not suitable for arithmetic operations.
 
Gray code has some applications in analog to digital converters, as well as being used for error correction in digital communication. Gray
codes are used in rotary and optical encoders.
Gray code to binary code conversion
Steps:
1. To convert Gray code to binary, bring down the most significant digit of the given Gray code number, because, the first digit or the
most significant digit of the Gray code number is same as the binary number.
2. To obtain the successive second binary bit, perform the EX-OR operation between the first bit or most significant digit of binary to the
second bit of the given Gray code.
3. To obtain the successive third binary bit, perform the EX-OR operation between the second bit or most significant digit of binary to
the third MSD (most significant digit) of Gray code and so on for the next successive binary bits conversion to find the equivalent
Example:
Binary code of (01101) Gray

Binary to Gray code conversion


Steps:
1.To convert binary to Gray code, bring down the most significant digit of the given binary number, because, the first digit or most
significant digit of the Gray code number is same as the binary number.
2. To obtain the successive Gray coded bits to produce the equivalent Gray coded number for the given binary, perform EX-OR
operation between the first bit or the most significant digit of binary to the second one and write down the result next to the first bit of
Gray code.
3.Repeat the step 2 until all binary bits hae been EX-ORed with their previous ones.
Example:

Table shows the 4 bit binary code and 4 bit Gray code for the decimals numbers from 0 to 15.

ASCII Code
ASCII Code(American Standard Code for Information Interchange) is a 7-bit code and can represent 2 = 128 possible characters,
7

This code is sufficient to represent all the standard keyboard characters as well as control functions such as RETURN etc,
Table shows the partial listing of ASCII Code.
For example, ASCII Code for K is (1001011)2.
Key Take away 
Classification of codes
BCD and Binary Codes are Weighted Codes
Gray and Excess-3 Codes are Non weighted codes
ASCII is Alphanumeric Code.
Conversion from one code to another.

 
 
Study Material
<Program Code: CO/CM/CW/DE/EJ/ET/EN/EX/EQ/IE/IS/IC/MU>: <Course Code:22320><Course Name: Digital Techniques><Topic Name:
Number Systems and code>
<UO1d. 1><study Material>

Course Expert: Mrs Date:21/07/2020 Mentor: Mr. K. P. Akole


Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective: BCD Adder

BCD code To perform BCD Addition


BCD Addition
Key Questions Concept Map

Q1. Did you know


that numbers
greater than nine
are invalid BCD
numbers?

Q2.?State the rules


of BCD addition.

BCD Code (8421 Code): In BCD 8421 code, each decimal Key Definitions
Solved word digit is represented using a 4-bit binary number. The 4-
Problem bit binary numbers have their weights attached as 8, 4, BCD code: In this code each decimal digit is
2, 1 from MSB to LSB side. Since the weights are represented by a 4-bit binary number. 
attached to it comes in the category of weighted
Q1.Add (57) and Numbers greater than 9 are invalid BCD numbers.
codes and is also sequential.
10

(26)   using BCD Give a correction of 6 for converting invalid BCD


In a digital system that accepts only binary numbers in
10

addition. numbers into valid BCD numbers


form of 0 and 1, the only way to interpret decimal
Solution:
numbers is its conversion from decimal to binary and
     0101 0111
vice-versa which is a slow process and it also requires a
+   0010 0110 .
huge electronic circuitry. So, we use BCD numbers. Also,
the sequential nature of BCD numbers makes it  
0111 1101 advantageous for performing arithmetic operations
+   0000 0110
 
     1000 0011    Application of 1’s complement method Link to YouTube/ OER/ video
 ComputerSystems
Ans is (83) 10  Microcontroller and Microprocessor https://nptel.ac.in/courses/108/105/108105132/
 Digital Systems click on lecture 25
 Alphanumeric Displays
 Financial Application https://www.electrical4u.com/bcd-or-binary-coded-
 Industrial Application decimal-bcd-conversion-addition-subtraction/
 Commercial Application

 BCD is a binary code of the ten decimal digits. It is not a binary equivalent.
 In the BCD, with four bits we can represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used
(0000 to 1001). 
 The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.
BCD Representation

To perform BCD addition


1. Add the BCD digits as regular binary numbers.
2. If the sum is 9 or less and no carry was generated, it is a valid BCD digit.
3. If the sum produces a carry, the sum is invalid and the number 6 (0110) must be added to the digit.
4. If the sum is greater than nine, the sum is invalid and the number 6 (0110) must be added to the digit.
5. Repeat for each of the BCD digits.

Case 1: Sum is equal to or less than 9 and carry = 0

Case 2: Sum is greater than 9 but carry= 0

The number 6 is being added to the addition result in the above case instead of any other numbers. It is done to skip the six invalid
states of binary coded decimal that is from 10 to 15 and again return to the BCD codes.

Case 3: Sum is less than or equal to 9 but carry = 1


Practise Example of BCD Addition:

Key Take away 


BCD Addition Rules:
Add the two numbers as in binary addition
If the 4-bit sum is equal to or less than 9,it is a valid BCD
If the 4-bit sum is greater than 9 or a carry is generated than it is invalid BCD and add 6 to the sum.

 
  

You might also like