SlideShare a Scribd company logo
1 of 27
Download to read offline
NUMBER
SYSTEM
&
BINARY
ARITHMETIC
UNIT I
DIGITAL
ELECTRONICS
PROF.ARTI GAVAS-PARAB
ANNA LEELA COLLEGE OF COMMERCE AND ECONOMICS, SHOBHA
JAYARAM SHETTY COLLEGE FOR BMS
CHAPTER I1
UNIT I: CONTENTS
 Number System:
 Analog System, digital system,
 Numbering system, binary number system, octal number system, hexadecimal number system, conversion from one number
system to another, floating point numbers,
 Weighted codes binary coded decimal, non-weighted codes Excess – 3 code, Gray code,
 Alphanumeric codes – ASCII Code, EBCDIC, ISCII Code, Hollerith Code, Morse Code,Teletypewriter (TTY), Error
detection and correction, Universal Product Code,
 Code conversion.
 Binary Arithmetic:
 Binary addition, Binary subtraction,
 Negative number representation,
 Subtraction using 1’s complement and 2’s complement, Binary multiplication and division,Arithmetic in octal number system,
Arithmetic in hexadecimal number system,
 BCD and Excess – 3 arithmetic.
C
H
A
P
T
E
R
I
C
H
A
P
T
E
R
II
BINARY ADDITION
 Binary arithmetic is essential part of all the digital
computers and many other digital system.
 Binary Addition is a key for binary subtraction,
multiplication,division.There are four rules of binary
addition.
In fourth case,
a binary addition is creating a sum of (1 + 1 = 10)
i.e. 0 is written in the given column and a carry of 1
over to the next column.
Example − Addition
BINARY SUBTRACTION
 Subtraction and Borrow, these two words
will be used very frequently for the binary
subtraction.There are four rules of binary
subtraction.
Example − Subtraction
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.
Example − Multiplication
BINARY DIVISION
 Binary division is similar to decimal division. It is
called as the long division procedure.
Example − Division
NEGATIVE NUMBER REPRESENTATION
 Negative numbers can be distinguishable with the help of extra bit or flag called sign bit or sign flag in Binary
number representation system for signed numbers.
 It is not possible to add minus or plus symbol in front of a binary number because a binary number can have only
two symbol either 0 or 1 for each position or bit.
 That’s why we use this extra bit called sign bit or sign flag.The value of sign bit is 1 for negative binary numbers
and 0 for positive numbers.
 There are three possible ways:
 Sign-Magnitude method,
 1’s Complement method,and
 2’s complement method.
SIGNED MAGNITUDE METHOD
 In this method, number is divided into two parts: Sign
bit and Magnitude. If the number is positive then sign
bit will be 0 and if number is negative then sign bit will
be 1. Magnitude is represented with the binary form
of the number to be represented.
 Example:Let we are using 5 bits register.The
representation of -5 to +5 will be as follows:
 Range of Numbers: For k bits register, MSB will be
sign bit and (k-1) bits will be magnitude. Positive largest
number that can be stored is (2(k-1)-1) and negative
lowest number that can be stored is -(2(k-1)-1).
 Note that drawback of this system is that 0 has two
different representation one is -0 (e.g., 1 0000 in five bit
register) and second is +0 (e.g., 0 0000 in five bit
register).
1’S COMPLEMENT METHOD
 Positive numbers are represented in the same way as
they are represented in sign magnitude method. If the
number is negative then it is represented using 1’s
complement.First represent the number with positive
sign and then take 1’s complement of that number.
 Example:Let we are using 5 bits register.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 1’s complement of 0 0101 and that is 1 1010.MSB is 1
which indicates that number is negative.
 MSB is always 1 in case of negative numbers.
 Range of Numbers:For k bits register,positive largest number
that can be stored is (2(k-1)-1) and negative lowest number that can
be stored is -(2(k-1)-1).
 Note that drawback of this system is that 0 has two different
representation one is -0 (e.g.,1 1111 in five bit register) and
second is +0 (e.g.,0 0000 in five bit register).
2’S COMPLEMENT METHOD
 2’s Complement Method: Positive numbers are represented
in the same way as they are represented in sign magnitude
method. 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: For k bits register, positive
largest number that can be stored is (2(k-1)-1) and
negative lowest number that can be 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.
2’s Complement
Step 1:Write the absolute value of the given number in
binary form. Prefix this number with 0 indicate that it is
positive.
Step 2:Take the complement of each bit by changing
zeroes to ones and ones to zero.
Step 3:Add 1 to your result.
SUBTRACTION USING 1’S COMPLEMENT
 The steps to be followed in subtraction by
1’s complement are:
 i)To write down 1’s complement of the
subtrahend.
 ii)To add this with the minuend.
 iii) If the result of addition has a carry over
then it is dropped and an 1 is added in the last
bit.
 iv) If there is no carry over, then 1’s
complement of the result of addition is
obtained to get the final result and it is
negative.
Evaluate: (i) 110101 – 100101
Solution:
1’s complement of 10011 is 011010. Hence
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
Add 1Becouse carry is 1 + 1
Final Result - 0 1 0 0 0 0
The required difference is 10000
SUBTRACTION USING 1’S COMPLEMENT: EXAMPLES
1’s complement of 111001 is 000110. Hence
Minued - 1 0 1 0 1 1
1’s complement of subtrahend - + 0 0 0 1 1 0
No Carry over - 1 1 0 0 0 1
Take complement of addition 0 0 1 1 1 0
Final Result - - 1 1 1 0
(ii) 101011 – 111001 (iii) 1011.001 – 110.10
1’s complement of 0110.100 is 1001.011 Hence
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
Add 1Becouse carry is 1 + 1
Final Result - 0 1 0 0 . 1 0 1
(iv) 10110.01 – 11010.10
1’s complement of 11010.10 is 00101.01
Minued - 1 0 1 1 0 . 0 1
1’s complement of subtrahend - + 0 0 1 0 1 . 0 1
No Carry over - 1 1 0 1 1 . 1 0
Final Result - – 100.01
Rules:
1. To write down 1’s complement of the subtrahend.
2. To add this with the minuend.
3. If the result of addition has a carry over then it is
dropped and an 1 is added in the last bit.
4. If there is no carry over, then 1’s complement of
the result of addition is obtained to get the final
result and it is negative.
SUBTRACTION USING 2’S COMPLEMENT
 The operation is carried out by
means of the following steps:
 (i) At first, 2’s complement of the
subtrahend is found.
 (ii) Then it is added to the minuend.
 (iii) If the final carry over of the sum
is 1, it is dropped and the result is
positive.
 (iv) If there is no carry over, the
two’s complement of the sum will be
the result and it is negative.
SUBTRACTION USING 2’S COMPLEMENT: EXAMPLES
Rules:
1. At first, 2’s complement of the
subtrahend is found.
2. Then it is added to the minuend.
3. If the final carry over of the sum is 1,
it is dropped and the result is
positive.
4. If there is no carry over, the two’s
complement of the sum will be the
result and it is negative.
SUBTRACTION USING 2’S COMPLEMENT: EXAMPLES
Rules:
1. At first, 2’s complement of the
subtrahend is found.
2. Then it is added to the minuend.
3. If the final carry over of the sum is 1,
it is dropped and the result is
positive.
4. If there is no carry over, the two’s
complement of the sum will be the
result and it is negative.
SUBTRACTION USING 2’S COMPLEMENT: EXAMPLES
Rules:
1. At first, 2’s complement of the
subtrahend is found.
2. Then it is added to the minuend.
3. If the final carry over of the sum is 1,
it is dropped and the result is
positive.
4. If there is no carry over, the two’s
complement of the sum will be the
result and it is negative.
SUBTRACTION OF LARGER FROM SMALLER USING 2’S COMPLEMENT
ARITHMETIC IN OCTAL NUMBER SYSTEM: OCTAL ADDITION
 Following are the
characteristics of an octal
number system:
 Uses eight digits, 0,1,2,3,4,5,6,7.
 Also called base 8 number
system.
 Each position in an octal
number represents a 0 power
of the base (8). Example: 80
 Last position in an octal
number represents an x power
of the base (8). Example: 8x
where x represents the last
position - 1.
Following octal addition table will help you to handle octal addition.
To use this table, simply
follow the directions used in
this example:
 Add 68 and 58.
 Locate 6 in the A column
then locate the 5 in the B
column.
 The point in 'sum' area
where these two columns
intersect is the 'sum' of
two numbers.
68 + 58 = 138.
OCTAL ADDITION:EXAMPLES
ARITHMETIC IN OCTAL NUMBER SYSTEM: OCTAL SUBTRACTION
 The subtraction of octal numbers follows the same rules as the subtraction of numbers in any other number
system.The only variation is in borrowed number. In the decimal system, you borrow a group of 1010. In the
binary system, you borrow a group of 210. In the octal system you borrow a group of 810.
ARITHMETIC IN HEXADECIMAL NUMBER SYSTEM:ADDITION
 Following are the characteristics
of a hexadecimal number system.
 Uses 10 digits and 6 letters,
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
 Letters represents numbers
starting from 10.A = 10,B = 11, C
= 12, D = 13, E = 14, F = 15.
 Also called base 16 number
system.
 Each position in a hexadecimal
number represents a 0 power of
the base (16).Example − 160
 Last position in a hexadecimal
number represents an x power of
the base (16).Example − 16x
where x represents the last
position - 1.
Following Hexadecimal addition table will help you
greatly to handle Hexadecimal addition.
To use this table, simply
follow the directions used
in this example −
 Add A16 and 516.
 Locate A in the X
column then locate the
5 in theY column.
 The point in 'sum' area
where these two
columns intersect is
the sum of two
numbers.
A16 + 516 = F16.
HEXADECIMAL ADDITION
ARITHMETIC IN HEXADECIMAL NUMBER SYSTEM: SUBTRACTION
 The subtraction of hexadecimal numbers follow
the same rules as the subtraction of numbers in
any other number system.
 The only variation is in borrowed number.
 In the decimal system, you borrow a group of
1010. In the binary system, you borrow a group of
210. In the hexadecimal system you borrow a
group of 1610.
3F57A – C85E = 32D1C
BCD AND EXCESS – 3 ARITHMETIC
 Excess 3 code is a basically a binary code which is made by adding 3 with the equivalent decimal of a binary
number and again converting it into binary number.
 BCD addition and subtraction can be done by this method.
 Step 1:We have to convert the BCD numbers (which are to be added) into excess 3 forms by adding 0011
with each of the four bit groups them or simply increasing them by 3.
 Step 2: Now the two numbers are added using the basic laws of binary addition, there is no exception for
this method.
 Step 3: Now which of the four groups have produced a carry we have to add 0011 with them and subtract
0011 from the groups which have not produced a carry during the addition.
 Step 4:The result which we have obtained after this operation is in Excess 3 form and this is our desired
result.
BCD ADDITION USING EXCESS 3 CODE
 Example: BCD numbers 356 & 579 to be added
using excess 3 code.
 Step 1: Convert each number into excess code by
adding 0011 to each subgroup.
 356 → 0011 0101 0110Adding 0011,
 Excess3 number of 356 is 0110 1000 1001
 579 → 0101 0111 1001Add 0011,
 Excess 3 number of 579 is 1000 1010 1100.
 Step 2: Simply do binary addition.
 Carry is produced in second & third subgroups.
 Step 3: Add 0011 when there is carry. Subtract 0011 when there is no
carry.
Considering third group where there is no carry.1111 - 0011=1100.
 Considering other 2 sub groups
0011 + 0011= 0110
0101+0011= 1000.
 Answer in excess3 is
1100 0110 1000.
 Step 4:To convert it back to BCD form,subtract 0011 from each
subgroup & express in BCD.
1100–0011=1001 -> 9
0110–0011=0011 ->3
1000- 0011= 0101 -> 5
 BCD answer is 935.
 (Verify 356+ 579 = 935).
0110 1000 1001
+1000 1010 1100
______________
1111 0011 0101
BCD SUBTRACTION USING EXCESS 3 CODE
 Step 1: convert both the number in
Excess-3 by adding 0011.
 Step 2: Follow Normal Binary
subtraction.
 Step 3: Subtract 0011 from each BCD 4-
bit binary group in the answer if the
subtraction operation of the relevant 4-
bit groups required a borrow from the
next higher adjacent 4-bit group.
 Step 4:Add 0011 to the remaining 4-bit
groups, if any in the result.
 Finally, we get the result on excess-3
code.
 Convert back into BCD.
Example: 0001 1000 0101 – 0000 0000 0001
Solution:
Step 1: Convert above numbers in XS-3
0100 1011 1000 and 0011 0011 1011.
Step 2: Perform Binary Subtraction
0100 1011 1000
- 0011 0011 1011
_____________
0001 0111 1101
Step 3:The last 4-bit group needed a borrow so we
need to subtract 0011 from result of this group.And
other two 4-bit groups didn’t require borrow so we
need to add 0011 to each of them.
0001 + 0011= 0100
0111 + 0011= 1010
1101 – 0011= 1010
Step 4:To convert it back to BCD form,subtract 0011
from each subgroup & express in BCD.
SoThe result will be 0001 0111 0111
THANKYOU!

More Related Content

What's hot

What's hot (20)

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
1's and 2's complement
1's and 2's complement 1's and 2's complement
1's and 2's complement
 
Adder ppt
Adder pptAdder ppt
Adder ppt
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
Complements
ComplementsComplements
Complements
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
 
Binary codes
Binary codesBinary codes
Binary codes
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Complement
ComplementComplement
Complement
 
Binary codes
Binary codesBinary codes
Binary codes
 
L3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptxL3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptx
 
Codes
CodesCodes
Codes
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
 
BCD to Decimal - Digital Electronics
BCD to Decimal - Digital ElectronicsBCD to Decimal - Digital Electronics
BCD to Decimal - Digital Electronics
 
Binary codes
Binary codesBinary codes
Binary codes
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1
 

Similar to FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arithmetic

1’s and 2’s complements
1’s and 2’s complements1’s and 2’s complements
1’s and 2’s complementsarunachalamr16
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.pptRavikumarR77
 
Computer arithmetic operations.pptx
Computer arithmetic operations.pptxComputer arithmetic operations.pptx
Computer arithmetic operations.pptxssusera6fdd5
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfTamiratDejene1
 
Physics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesPhysics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesbiswanath dehuri
 
2sComplementArithmetic1.ppt
2sComplementArithmetic1.ppt2sComplementArithmetic1.ppt
2sComplementArithmetic1.pptSathishkumar.V
 
2sComplementArithmetic1.ppt
2sComplementArithmetic1.ppt2sComplementArithmetic1.ppt
2sComplementArithmetic1.pptMeghadriGhosh4
 
2sComplementArithmetic1 lecture slides ppt
2sComplementArithmetic1 lecture slides ppt2sComplementArithmetic1 lecture slides ppt
2sComplementArithmetic1 lecture slides pptnashitahalwaz95
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rulesstudent
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesDr. Anita Goel
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfGafryMahmoud
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001aarunachalamr16
 
Unit ii ca--arithmetic
Unit ii ca--arithmeticUnit ii ca--arithmetic
Unit ii ca--arithmeticPraba haran
 

Similar to FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arithmetic (20)

1’s and 2’s complements
1’s and 2’s complements1’s and 2’s complements
1’s and 2’s complements
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
2's complement
2's complement2's complement
2's complement
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Computer arithmetic operations.pptx
Computer arithmetic operations.pptxComputer arithmetic operations.pptx
Computer arithmetic operations.pptx
 
unit-2_DL.pdf
unit-2_DL.pdfunit-2_DL.pdf
unit-2_DL.pdf
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
Physics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesPhysics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gates
 
Alu1
Alu1Alu1
Alu1
 
2sComplementArithmetic1.ppt
2sComplementArithmetic1.ppt2sComplementArithmetic1.ppt
2sComplementArithmetic1.ppt
 
2sComplementArithmetic1.ppt
2sComplementArithmetic1.ppt2sComplementArithmetic1.ppt
2sComplementArithmetic1.ppt
 
2sComplementArithmetic1 lecture slides ppt
2sComplementArithmetic1 lecture slides ppt2sComplementArithmetic1 lecture slides ppt
2sComplementArithmetic1 lecture slides ppt
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
Arithmetic circuits
Arithmetic circuitsArithmetic circuits
Arithmetic circuits
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdf
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Unit ii ca--arithmetic
Unit ii ca--arithmeticUnit ii ca--arithmetic
Unit ii ca--arithmetic
 

More from Arti Parab Academics

COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptxCOMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptxArti Parab Academics
 
COMPUTER APPLICATIONS Module 1 CAH.pptx
COMPUTER APPLICATIONS Module 1 CAH.pptxCOMPUTER APPLICATIONS Module 1 CAH.pptx
COMPUTER APPLICATIONS Module 1 CAH.pptxArti Parab Academics
 
Health Informatics- Module 5-Chapter 2.pptx
Health Informatics- Module 5-Chapter 2.pptxHealth Informatics- Module 5-Chapter 2.pptx
Health Informatics- Module 5-Chapter 2.pptxArti Parab Academics
 
Health Informatics- Module 5-Chapter 3.pptx
Health Informatics- Module 5-Chapter 3.pptxHealth Informatics- Module 5-Chapter 3.pptx
Health Informatics- Module 5-Chapter 3.pptxArti Parab Academics
 
Health Informatics- Module 4-Chapter 3.pptx
Health Informatics- Module 4-Chapter 3.pptxHealth Informatics- Module 4-Chapter 3.pptx
Health Informatics- Module 4-Chapter 3.pptxArti Parab Academics
 
Health Informatics- Module 3-Chapter 2.pptx
Health Informatics- Module 3-Chapter 2.pptxHealth Informatics- Module 3-Chapter 2.pptx
Health Informatics- Module 3-Chapter 2.pptxArti Parab Academics
 
Health Informatics- Module 4-Chapter 1.pptx
Health Informatics- Module 4-Chapter 1.pptxHealth Informatics- Module 4-Chapter 1.pptx
Health Informatics- Module 4-Chapter 1.pptxArti Parab Academics
 
Health Informatics- Module 4-Chapter 2.pptx
Health Informatics- Module 4-Chapter 2.pptxHealth Informatics- Module 4-Chapter 2.pptx
Health Informatics- Module 4-Chapter 2.pptxArti Parab Academics
 
Health Informatics- Module 3-Chapter 3.pptx
Health Informatics- Module 3-Chapter 3.pptxHealth Informatics- Module 3-Chapter 3.pptx
Health Informatics- Module 3-Chapter 3.pptxArti Parab Academics
 
Health Informatics- Module 5-Chapter 1.pptx
Health Informatics- Module 5-Chapter 1.pptxHealth Informatics- Module 5-Chapter 1.pptx
Health Informatics- Module 5-Chapter 1.pptxArti Parab Academics
 
Health Informatics- Module 3-Chapter 1.pptx
Health Informatics- Module 3-Chapter 1.pptxHealth Informatics- Module 3-Chapter 1.pptx
Health Informatics- Module 3-Chapter 1.pptxArti Parab Academics
 
Health Informatics- Module 2-Chapter 2.pptx
Health Informatics- Module 2-Chapter 2.pptxHealth Informatics- Module 2-Chapter 2.pptx
Health Informatics- Module 2-Chapter 2.pptxArti Parab Academics
 
Health Informatics- Module 1-Chapter 1.pptx
Health Informatics- Module 1-Chapter 1.pptxHealth Informatics- Module 1-Chapter 1.pptx
Health Informatics- Module 1-Chapter 1.pptxArti Parab Academics
 
Health Informatics- Module 2-Chapter 3.pptx
Health Informatics- Module 2-Chapter 3.pptxHealth Informatics- Module 2-Chapter 3.pptx
Health Informatics- Module 2-Chapter 3.pptxArti Parab Academics
 
Health Informatics- Module 2-Chapter 1.pptx
Health Informatics- Module 2-Chapter 1.pptxHealth Informatics- Module 2-Chapter 1.pptx
Health Informatics- Module 2-Chapter 1.pptxArti Parab Academics
 
Health Informatics- Module 1-Chapter 2.pptx
Health Informatics- Module 1-Chapter 2.pptxHealth Informatics- Module 1-Chapter 2.pptx
Health Informatics- Module 1-Chapter 2.pptxArti Parab Academics
 

More from Arti Parab Academics (20)

COMPUTER APPLICATIONS Module 4.pptx
COMPUTER APPLICATIONS Module 4.pptxCOMPUTER APPLICATIONS Module 4.pptx
COMPUTER APPLICATIONS Module 4.pptx
 
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptxCOMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
 
COMPUTER APPLICATIONS Module 5.pptx
COMPUTER APPLICATIONS Module 5.pptxCOMPUTER APPLICATIONS Module 5.pptx
COMPUTER APPLICATIONS Module 5.pptx
 
COMPUTER APPLICATIONS Module 1 CAH.pptx
COMPUTER APPLICATIONS Module 1 CAH.pptxCOMPUTER APPLICATIONS Module 1 CAH.pptx
COMPUTER APPLICATIONS Module 1 CAH.pptx
 
COMPUTER APPLICATIONS Module 3.pptx
COMPUTER APPLICATIONS Module 3.pptxCOMPUTER APPLICATIONS Module 3.pptx
COMPUTER APPLICATIONS Module 3.pptx
 
COMPUTER APPLICATIONS Module 2.pptx
COMPUTER APPLICATIONS Module 2.pptxCOMPUTER APPLICATIONS Module 2.pptx
COMPUTER APPLICATIONS Module 2.pptx
 
Health Informatics- Module 5-Chapter 2.pptx
Health Informatics- Module 5-Chapter 2.pptxHealth Informatics- Module 5-Chapter 2.pptx
Health Informatics- Module 5-Chapter 2.pptx
 
Health Informatics- Module 5-Chapter 3.pptx
Health Informatics- Module 5-Chapter 3.pptxHealth Informatics- Module 5-Chapter 3.pptx
Health Informatics- Module 5-Chapter 3.pptx
 
Health Informatics- Module 4-Chapter 3.pptx
Health Informatics- Module 4-Chapter 3.pptxHealth Informatics- Module 4-Chapter 3.pptx
Health Informatics- Module 4-Chapter 3.pptx
 
Health Informatics- Module 3-Chapter 2.pptx
Health Informatics- Module 3-Chapter 2.pptxHealth Informatics- Module 3-Chapter 2.pptx
Health Informatics- Module 3-Chapter 2.pptx
 
Health Informatics- Module 4-Chapter 1.pptx
Health Informatics- Module 4-Chapter 1.pptxHealth Informatics- Module 4-Chapter 1.pptx
Health Informatics- Module 4-Chapter 1.pptx
 
Health Informatics- Module 4-Chapter 2.pptx
Health Informatics- Module 4-Chapter 2.pptxHealth Informatics- Module 4-Chapter 2.pptx
Health Informatics- Module 4-Chapter 2.pptx
 
Health Informatics- Module 3-Chapter 3.pptx
Health Informatics- Module 3-Chapter 3.pptxHealth Informatics- Module 3-Chapter 3.pptx
Health Informatics- Module 3-Chapter 3.pptx
 
Health Informatics- Module 5-Chapter 1.pptx
Health Informatics- Module 5-Chapter 1.pptxHealth Informatics- Module 5-Chapter 1.pptx
Health Informatics- Module 5-Chapter 1.pptx
 
Health Informatics- Module 3-Chapter 1.pptx
Health Informatics- Module 3-Chapter 1.pptxHealth Informatics- Module 3-Chapter 1.pptx
Health Informatics- Module 3-Chapter 1.pptx
 
Health Informatics- Module 2-Chapter 2.pptx
Health Informatics- Module 2-Chapter 2.pptxHealth Informatics- Module 2-Chapter 2.pptx
Health Informatics- Module 2-Chapter 2.pptx
 
Health Informatics- Module 1-Chapter 1.pptx
Health Informatics- Module 1-Chapter 1.pptxHealth Informatics- Module 1-Chapter 1.pptx
Health Informatics- Module 1-Chapter 1.pptx
 
Health Informatics- Module 2-Chapter 3.pptx
Health Informatics- Module 2-Chapter 3.pptxHealth Informatics- Module 2-Chapter 3.pptx
Health Informatics- Module 2-Chapter 3.pptx
 
Health Informatics- Module 2-Chapter 1.pptx
Health Informatics- Module 2-Chapter 1.pptxHealth Informatics- Module 2-Chapter 1.pptx
Health Informatics- Module 2-Chapter 1.pptx
 
Health Informatics- Module 1-Chapter 2.pptx
Health Informatics- Module 1-Chapter 2.pptxHealth Informatics- Module 1-Chapter 2.pptx
Health Informatics- Module 1-Chapter 2.pptx
 

Recently uploaded

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 

Recently uploaded (20)

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 

FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arithmetic

  • 1. NUMBER SYSTEM & BINARY ARITHMETIC UNIT I DIGITAL ELECTRONICS PROF.ARTI GAVAS-PARAB ANNA LEELA COLLEGE OF COMMERCE AND ECONOMICS, SHOBHA JAYARAM SHETTY COLLEGE FOR BMS CHAPTER I1
  • 2. UNIT I: CONTENTS  Number System:  Analog System, digital system,  Numbering system, binary number system, octal number system, hexadecimal number system, conversion from one number system to another, floating point numbers,  Weighted codes binary coded decimal, non-weighted codes Excess – 3 code, Gray code,  Alphanumeric codes – ASCII Code, EBCDIC, ISCII Code, Hollerith Code, Morse Code,Teletypewriter (TTY), Error detection and correction, Universal Product Code,  Code conversion.  Binary Arithmetic:  Binary addition, Binary subtraction,  Negative number representation,  Subtraction using 1’s complement and 2’s complement, Binary multiplication and division,Arithmetic in octal number system, Arithmetic in hexadecimal number system,  BCD and Excess – 3 arithmetic. C H A P T E R I C H A P T E R II
  • 3. BINARY ADDITION  Binary arithmetic is essential part of all the digital computers and many other digital system.  Binary Addition is a key for binary subtraction, multiplication,division.There are four rules of binary addition. In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given column and a carry of 1 over to the next column. Example − Addition
  • 4. BINARY SUBTRACTION  Subtraction and Borrow, these two words will be used very frequently for the binary subtraction.There are four rules of binary subtraction. Example − Subtraction
  • 5. 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. Example − Multiplication
  • 6. BINARY DIVISION  Binary division is similar to decimal division. It is called as the long division procedure. Example − Division
  • 7. NEGATIVE NUMBER REPRESENTATION  Negative numbers can be distinguishable with the help of extra bit or flag called sign bit or sign flag in Binary number representation system for signed numbers.  It is not possible to add minus or plus symbol in front of a binary number because a binary number can have only two symbol either 0 or 1 for each position or bit.  That’s why we use this extra bit called sign bit or sign flag.The value of sign bit is 1 for negative binary numbers and 0 for positive numbers.  There are three possible ways:  Sign-Magnitude method,  1’s Complement method,and  2’s complement method.
  • 8. SIGNED MAGNITUDE METHOD  In this method, number is divided into two parts: Sign bit and Magnitude. If the number is positive then sign bit will be 0 and if number is negative then sign bit will be 1. Magnitude is represented with the binary form of the number to be represented.  Example:Let we are using 5 bits register.The representation of -5 to +5 will be as follows:  Range of Numbers: For k bits register, MSB will be sign bit and (k-1) bits will be magnitude. Positive largest number that can be stored is (2(k-1)-1) and negative lowest number that can be stored is -(2(k-1)-1).  Note that drawback of this system is that 0 has two different representation one is -0 (e.g., 1 0000 in five bit register) and second is +0 (e.g., 0 0000 in five bit register).
  • 9. 1’S COMPLEMENT METHOD  Positive numbers are represented in the same way as they are represented in sign magnitude method. If the number is negative then it is represented using 1’s complement.First represent the number with positive sign and then take 1’s complement of that number.  Example:Let we are using 5 bits register.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 1’s complement of 0 0101 and that is 1 1010.MSB is 1 which indicates that number is negative.  MSB is always 1 in case of negative numbers.  Range of Numbers:For k bits register,positive largest number that can be stored is (2(k-1)-1) and negative lowest number that can be stored is -(2(k-1)-1).  Note that drawback of this system is that 0 has two different representation one is -0 (e.g.,1 1111 in five bit register) and second is +0 (e.g.,0 0000 in five bit register).
  • 10. 2’S COMPLEMENT METHOD  2’s Complement Method: Positive numbers are represented in the same way as they are represented in sign magnitude method. 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: For k bits register, positive largest number that can be stored is (2(k-1)-1) and negative lowest number that can be 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. 2’s Complement Step 1:Write the absolute value of the given number in binary form. Prefix this number with 0 indicate that it is positive. Step 2:Take the complement of each bit by changing zeroes to ones and ones to zero. Step 3:Add 1 to your result.
  • 11. SUBTRACTION USING 1’S COMPLEMENT  The steps to be followed in subtraction by 1’s complement are:  i)To write down 1’s complement of the subtrahend.  ii)To add this with the minuend.  iii) If the result of addition has a carry over then it is dropped and an 1 is added in the last bit.  iv) If there is no carry over, then 1’s complement of the result of addition is obtained to get the final result and it is negative. Evaluate: (i) 110101 – 100101 Solution: 1’s complement of 10011 is 011010. Hence 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 Add 1Becouse carry is 1 + 1 Final Result - 0 1 0 0 0 0 The required difference is 10000
  • 12. SUBTRACTION USING 1’S COMPLEMENT: EXAMPLES 1’s complement of 111001 is 000110. Hence Minued - 1 0 1 0 1 1 1’s complement of subtrahend - + 0 0 0 1 1 0 No Carry over - 1 1 0 0 0 1 Take complement of addition 0 0 1 1 1 0 Final Result - - 1 1 1 0 (ii) 101011 – 111001 (iii) 1011.001 – 110.10 1’s complement of 0110.100 is 1001.011 Hence 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 Add 1Becouse carry is 1 + 1 Final Result - 0 1 0 0 . 1 0 1 (iv) 10110.01 – 11010.10 1’s complement of 11010.10 is 00101.01 Minued - 1 0 1 1 0 . 0 1 1’s complement of subtrahend - + 0 0 1 0 1 . 0 1 No Carry over - 1 1 0 1 1 . 1 0 Final Result - – 100.01 Rules: 1. To write down 1’s complement of the subtrahend. 2. To add this with the minuend. 3. If the result of addition has a carry over then it is dropped and an 1 is added in the last bit. 4. If there is no carry over, then 1’s complement of the result of addition is obtained to get the final result and it is negative.
  • 13. SUBTRACTION USING 2’S COMPLEMENT  The operation is carried out by means of the following steps:  (i) At first, 2’s complement of the subtrahend is found.  (ii) Then it is added to the minuend.  (iii) If the final carry over of the sum is 1, it is dropped and the result is positive.  (iv) If there is no carry over, the two’s complement of the sum will be the result and it is negative.
  • 14. SUBTRACTION USING 2’S COMPLEMENT: EXAMPLES Rules: 1. At first, 2’s complement of the subtrahend is found. 2. Then it is added to the minuend. 3. If the final carry over of the sum is 1, it is dropped and the result is positive. 4. If there is no carry over, the two’s complement of the sum will be the result and it is negative.
  • 15. SUBTRACTION USING 2’S COMPLEMENT: EXAMPLES Rules: 1. At first, 2’s complement of the subtrahend is found. 2. Then it is added to the minuend. 3. If the final carry over of the sum is 1, it is dropped and the result is positive. 4. If there is no carry over, the two’s complement of the sum will be the result and it is negative.
  • 16. SUBTRACTION USING 2’S COMPLEMENT: EXAMPLES Rules: 1. At first, 2’s complement of the subtrahend is found. 2. Then it is added to the minuend. 3. If the final carry over of the sum is 1, it is dropped and the result is positive. 4. If there is no carry over, the two’s complement of the sum will be the result and it is negative.
  • 17. SUBTRACTION OF LARGER FROM SMALLER USING 2’S COMPLEMENT
  • 18. ARITHMETIC IN OCTAL NUMBER SYSTEM: OCTAL ADDITION  Following are the characteristics of an octal number system:  Uses eight digits, 0,1,2,3,4,5,6,7.  Also called base 8 number system.  Each position in an octal number represents a 0 power of the base (8). Example: 80  Last position in an octal number represents an x power of the base (8). Example: 8x where x represents the last position - 1. Following octal addition table will help you to handle octal addition. To use this table, simply follow the directions used in this example:  Add 68 and 58.  Locate 6 in the A column then locate the 5 in the B column.  The point in 'sum' area where these two columns intersect is the 'sum' of two numbers. 68 + 58 = 138.
  • 20. ARITHMETIC IN OCTAL NUMBER SYSTEM: OCTAL SUBTRACTION  The subtraction of octal numbers follows the same rules as the subtraction of numbers in any other number system.The only variation is in borrowed number. In the decimal system, you borrow a group of 1010. In the binary system, you borrow a group of 210. In the octal system you borrow a group of 810.
  • 21. ARITHMETIC IN HEXADECIMAL NUMBER SYSTEM:ADDITION  Following are the characteristics of a hexadecimal number system.  Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.  Letters represents numbers starting from 10.A = 10,B = 11, C = 12, D = 13, E = 14, F = 15.  Also called base 16 number system.  Each position in a hexadecimal number represents a 0 power of the base (16).Example − 160  Last position in a hexadecimal number represents an x power of the base (16).Example − 16x where x represents the last position - 1. Following Hexadecimal addition table will help you greatly to handle Hexadecimal addition. To use this table, simply follow the directions used in this example −  Add A16 and 516.  Locate A in the X column then locate the 5 in theY column.  The point in 'sum' area where these two columns intersect is the sum of two numbers. A16 + 516 = F16.
  • 23. ARITHMETIC IN HEXADECIMAL NUMBER SYSTEM: SUBTRACTION  The subtraction of hexadecimal numbers follow the same rules as the subtraction of numbers in any other number system.  The only variation is in borrowed number.  In the decimal system, you borrow a group of 1010. In the binary system, you borrow a group of 210. In the hexadecimal system you borrow a group of 1610. 3F57A – C85E = 32D1C
  • 24. BCD AND EXCESS – 3 ARITHMETIC  Excess 3 code is a basically a binary code which is made by adding 3 with the equivalent decimal of a binary number and again converting it into binary number.  BCD addition and subtraction can be done by this method.  Step 1:We have to convert the BCD numbers (which are to be added) into excess 3 forms by adding 0011 with each of the four bit groups them or simply increasing them by 3.  Step 2: Now the two numbers are added using the basic laws of binary addition, there is no exception for this method.  Step 3: Now which of the four groups have produced a carry we have to add 0011 with them and subtract 0011 from the groups which have not produced a carry during the addition.  Step 4:The result which we have obtained after this operation is in Excess 3 form and this is our desired result.
  • 25. BCD ADDITION USING EXCESS 3 CODE  Example: BCD numbers 356 & 579 to be added using excess 3 code.  Step 1: Convert each number into excess code by adding 0011 to each subgroup.  356 → 0011 0101 0110Adding 0011,  Excess3 number of 356 is 0110 1000 1001  579 → 0101 0111 1001Add 0011,  Excess 3 number of 579 is 1000 1010 1100.  Step 2: Simply do binary addition.  Carry is produced in second & third subgroups.  Step 3: Add 0011 when there is carry. Subtract 0011 when there is no carry. Considering third group where there is no carry.1111 - 0011=1100.  Considering other 2 sub groups 0011 + 0011= 0110 0101+0011= 1000.  Answer in excess3 is 1100 0110 1000.  Step 4:To convert it back to BCD form,subtract 0011 from each subgroup & express in BCD. 1100–0011=1001 -> 9 0110–0011=0011 ->3 1000- 0011= 0101 -> 5  BCD answer is 935.  (Verify 356+ 579 = 935). 0110 1000 1001 +1000 1010 1100 ______________ 1111 0011 0101
  • 26. BCD SUBTRACTION USING EXCESS 3 CODE  Step 1: convert both the number in Excess-3 by adding 0011.  Step 2: Follow Normal Binary subtraction.  Step 3: Subtract 0011 from each BCD 4- bit binary group in the answer if the subtraction operation of the relevant 4- bit groups required a borrow from the next higher adjacent 4-bit group.  Step 4:Add 0011 to the remaining 4-bit groups, if any in the result.  Finally, we get the result on excess-3 code.  Convert back into BCD. Example: 0001 1000 0101 – 0000 0000 0001 Solution: Step 1: Convert above numbers in XS-3 0100 1011 1000 and 0011 0011 1011. Step 2: Perform Binary Subtraction 0100 1011 1000 - 0011 0011 1011 _____________ 0001 0111 1101 Step 3:The last 4-bit group needed a borrow so we need to subtract 0011 from result of this group.And other two 4-bit groups didn’t require borrow so we need to add 0011 to each of them. 0001 + 0011= 0100 0111 + 0011= 1010 1101 – 0011= 1010 Step 4:To convert it back to BCD form,subtract 0011 from each subgroup & express in BCD. SoThe result will be 0001 0111 0111