0% found this document useful (0 votes)
22 views61 pages

SYJC - Number Systems

Uploaded by

Nirmay More
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views61 pages

SYJC - Number Systems

Uploaded by

Nirmay More
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Electronics Paper – II

Chp. 1. Number Systems

Presentation prepared by

Ms. Ankita Nagwekar


Incharge, Electronics Department
Mithibai College
Introduction
Concept of Encoding and Decoding

Human understandable data (any picture, image, audio, video, text)


when converted to computer understandable language

Binary Number System 0 and 1


Decimal Number System 0, 1, 2, 3, …….., 9

Ms. Ankita Nagwekar, Incharge, Electronics


Radix of Number System
Radix is the total number of symbols used in that number
system.
It represents the weightage or power of each bit.

For example, the radix of Decimal number system is ‘10’,


because there are total 10 symbols (0, 1,…,9).
Weightage of each digit is in power of 10.

The radix of Binary number system is ‘2’, because there


are only 2 symbols (0, 1).
Weightage of each digit is in power of 2.

Ms. Ankita Nagwekar, Incharge, Electronics


Radix of Number System
Consider a number 6834, then the value is
calculated as

It is represented as (6834)10 where subscript ‘10’


indicates that the number belongs to Decimal
number system
Ms. Ankita Nagwekar, Incharge, Electronics
Radix of some other NS
In this chapter we will be studying three
basic Number systems, and conversions
from one NS to other (Numericals in
Boards)

Ms. Ankita Nagwekar, Incharge, Electronics


Part – I
Conversion from one NS to other
Binary Counting using 8-4-2-1 Rule

Ms. Ankita Nagwekar, Incharge, Electronics


Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


1. Binary to Decimal Conversion

Remember
Steps: (for Integers and Fractions) this !
1. Write the given Binary number
2. Below each number, write the corresponding
Binary weight (power)
3. Multiply the Binary number and its weight
4. Add the remaining numbers
Ms. Ankita Nagwekar, Incharge, Electronics
1. Binary to Decimal Conversion

Ms. Ankita Nagwekar, Incharge, Electronics


1. Binary to Decimal Conversion
Ques. Convert (11101)2

Now try this!


Ques. Convert (100011)2
Ms. Ankita Nagwekar, Incharge, Electronics
1. Binary to Decimal Conversion
Ques. If (100001)2 = (X)10, find X

Ms. Ankita Nagwekar, Incharge, Electronics


1. Binary to Decimal Conversion
Fractional Binary Numbers:
Ques.

Ques.

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Also known as Double – Dabble Method
o Least Significant Bit
o Most Significant Bit

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Steps for DD method (for Integers):
1. Write the given decimal number
2. Divide the number by ‘2’ and note down
the remainder
3. Continue dividing by ‘2’ till you get ‘1’
4. Last number is the MSB
Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Simple factorization

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Ques. Perform the following conversion
(29)10 = (?)2

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Ques. Convert (35)10 into binary

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Ques. Convert (69)10 into binary

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Ques. Convert (88)10 into binary

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Steps for DD method (for Fractions):
1. Write the given fractional number
2. Multiply the Fraction by ‘2’ and note
down only the Integer part of the
multiplication (Separate the fraction part
of the multiplication)
3. Continue multiplying by ‘2’ three times
4. First number is the MSB Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Ques. Convert (88.625)10 into binary

Ms. Ankita Nagwekar, Incharge, Electronics


2. Decimal to Binary Conversion
Ques. Convert (69.375)10 into binary

Ms. Ankita Nagwekar, Incharge, Electronics


3. Hexadecimal to Decimal
Conversion
Remember Binary to Decimal conversion!

Just replace ‘2’ by ’16’

Ms. Ankita Nagwekar, Incharge, Electronics


3. Hexadecimal to Decimal
Conversion
Steps: (for Integers and Fractions)
1. Write the given Hex number
2. Below each number, write the
corresponding weight (power)
3. Multiply the Hex number and its weight
4. Add the remaining numbers

Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


3. Hexadecimal to Decimal
Conversion
Ques. Convert (3 A 0)16 into decimal

Ms. Ankita Nagwekar, Incharge, Electronics


3. Hexadecimal to Decimal
Conversion
Ques. Convert (9 A E)16 into decimal

Ms. Ankita Nagwekar, Incharge, Electronics


3. Hexadecimal to Decimal
Conversion

Ques. Perform (7 F F . 8)16 = (?)10

Ms. Ankita Nagwekar, Incharge, Electronics


4. Decimal to Hexadecimal
Conversion
Steps:
1. Write the given decimal number
2. Divide the number by ‘16’ and note
down the remainder
3. Continue dividing by ‘16’ till you get ‘1’
4. Last number is the MSB
Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


4. Decimal to Hexadecimal
Conversion
Ques. Convert (928)10 to Hexa

Ms. Ankita Nagwekar, Incharge, Electronics


4. Decimal to Hexadecimal
Conversion
Ques. Convert (328)10 to Hexa

Ms. Ankita Nagwekar, Incharge, Electronics


5. Hexadecimal to Binary
Conversion
Steps (for Integers and fractions)
1. Write the given Hexa number
2. Below each Hexa number, directly write
the 4-bit Binary equivalent

Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


5. Hexadecimal to Binary
Conversion
Ques.

Ques. 2) convert (C 9 F)16 into binary

Ms. Ankita Nagwekar, Incharge, Electronics


5. Hexadecimal to Binary
Conversion

Ques. 3) convert (8 B 5. 1 F )16 into binary


8 B 5 . 1 F
(1000 1011 0101 . 0001 1111)2

Ms. Ankita Nagwekar, Incharge, Electronics


6. Binary to Hexadecimal
Conversion
Steps (for Integers and fractions)
1. Write the given Binary number
2. Starting from the Decimal point, make
group of 4-bits
3. If number of bits are insufficient, then
add ‘0’s
Remember
this !

Ms. Ankita Nagwekar, Incharge, Electronics


6. Binary to Hexadecimal
Conversion
Ques. 1) Convert (1101 0001 1111)2 in Hex
= 1101 0001 1111
= D 1 F
Ans: (110100011111)2 = (D1F)16

Ques. 2) Convert (010 1010 1011)2 in Hex


= 0010 1010 1011
= 2 A B
Ans: (01010101011)2 = (2AB)16
Ms. Ankita Nagwekar, Incharge, Electronics
6. Binary to Hexadecimal
Conversion
Ques. 3) Convert (110 1010. 0010 1)2 in
Hex

= 0110 1010 . 0010 1000


= 6 A . 2 8
Ans: (1101010.00101)2 = (6A.28)16

Ms. Ankita Nagwekar, Incharge, Electronics


BCD, ASCII and EBCDIC codes
1. BCD codes:

BCD stands for Binary Coded Decimal.

For higher decimal numbers, the binary


equivalents become a long chain of 0’s and
1’s
Example, Find Binary equivalent of (539)10

So to avoid this, BCD codes are used.


Ms. Ankita Nagwekar, Incharge, Electronics
BCD codes:
Steps to find the BCD code:
Each decimal number is represented by its 4-
bit binary code

Ques. Find BCD equivalent of (539)10

Ans: (539)10 = (0101 0011 1001)BCD


Ms. Ankita Nagwekar, Incharge, Electronics
BCD codes:
To convert a BCD number back to decimal, make
group of 4-bits and write the decimal equivalent
Ques.

Advantages of BCD codes:


o Length of the number is short
o Easy to convert to and from BCD
o Suitable for hexadecimal addition
Ms. Ankita Nagwekar, Incharge, Electronics
BCD codes:
Magic of number 10

10 in Hexadecimal number system is (A)16


10 in Decimal number system is (10)10
10 in Binary number system is (1010)2

10 in BCD is (0001 0000)BCD

Ms. Ankita Nagwekar, Incharge, Electronics


BCD, ASCII and EBCDIC codes
2. ASCII codes
ASCII stands for American Standard Code for
Information Interchange.
It is normally used for computer keyboard.
ASCII code uses either 7-bit or 8-bit code to
represent numbers and characters.

3. EBCDIC codes:
EBCDIC stands for Extended BCD
Interchange Code.
EBCDIC is 8-bit code.
Ms. Ankita Nagwekar, Incharge, Electronics
Part – I I
Binary Arithmetic
In this part, we will be studying
o Binary Addition
o Rules of Binary addition
o Signed Binary Numbers
o Binary Subtraction
o Methods of Binary Subtraction (1’s and 2’s
complement methods)

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Addition and Rules of Binary
Addition Remember
To perform A + B, this !

A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

So, in Binary, 1+1 = 0 carry 1

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Addition and Rules of Binary
Addition Remember
this !
1+1 0 carry 1
1+1+1 1 carry 1

For even number of 1’s, sum is always 0 and carry


is number of pairs
For odd number of 1’s, sum is always 1 and carry
is number of pairs

1+1+1+1 0 carry 1,1


1+1+1+1+1 1 carry 1,1
Ms. Ankita Nagwekar, Incharge, Electronics
Binary Addition and
EAC (End Around Carry)
Ques. Perform 12 + 10 using rules of
Binary Addition

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Addition and
EAC (End Around Carry)
Ques. Perform A + B + C using rules of
Binary Addition

Ms. Ankita Nagwekar, Incharge, Electronics


Signed Binary Numbers
Signed Binary Numbers are used to
represent Binary numbers along with their
sign (+ or -)
Means, used to indicate whether number is
positive or negative

Decimal Numbers: +8 and -8


Along with Radix: (+8)10 and (-8)10

Ms. Ankita Nagwekar, Incharge, Electronics


Signed Binary Numbers
Now to represent decimal number +8 and
-8 in Binary
Rule: Sign of any Binary number is its MSB.
Positive number: MSB = 0
Negative number: MSB = 1
Signed Binary representation:
(+8)10 = (01000)signed
(-8)10 = (11000)signed

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction
Binary Subtraction using
1’s complement method and
2’s complement method

How to find 1’s complement of any Binary


number:
Replace 0 by 1 and 1 by 0
eg. Binary number is 1011
So its 1’s complement will be 0100

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction
How to find 2’s complement of any Binary
number:
First find its 1’s complement Addition is
always done
2’s comp = 1’s comp + 1 starting
from LSB
eg. Binary number is 1011
So its 1’s comp will be 0100
Now 2’s comp will be 0100
+1
0101

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
1’s complement method Remember
To perform subtraction, A - B this !

Steps:
1. Find the binary equivalent of A and B
2. Find the 1’s comp of B
3. Find: A + 1’s comp of B
4. If carry = 1; then answer is positive;
Add this End Around Carry (EAC)
If carry = 0; then answer is negative;
So again find 1’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
1’s complement method
Ques. Perform 12 - 8 using 1’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
1’s complement method
Ques. Perform 14 – 6 using 1’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
1’s complement method
Ques. Perform 9 – 12 using 1’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
1’s complement method
Now try this one!
Ques. Perform 8 – 14 using 1’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
2’s complement method Remember
To perform subtraction, A - B this !

Steps:
1. Find the binary equivalent of A and B
2. Find the 2’s comp of B
3. Find: A + 2’s comp of B
4. If carry = 1; then answer is positive;
Discard this End Around Carry (EAC)
If carry = 0; then answer is negative;
So again find 2’s comp
Ms. Ankita Nagwekar, Incharge, Electronics
Binary Subtraction using
2’s complement method
Ques. Perform 12 – 8 using 2’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
2’s complement method
Ques. Perform 14 – 9 using 2’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
2’s complement method
Ques. Perform 8 – 12 using 2’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Binary Subtraction using
2’s complement method
Ques. Perform 6 – 11 using 2’s comp

Ms. Ankita Nagwekar, Incharge, Electronics


Practice, Practice and Practice !!

Ms. Ankita Nagwekar, Incharge, Electronics

You might also like