0% found this document useful (0 votes)
5 views

Number System Representation - Study Notes

Uploaded by

lyragashu211
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)
5 views

Number System Representation - Study Notes

Uploaded by

lyragashu211
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/ 12

Number

System
Representation

DIGITAL ELCTRONICS

Copyright © 2014-2020 TestBook Edu Solutions Pvt. Ltd.: All rights reserved
Download Testbook App

Number System
Representation
Number system is a method of Counting.

General Representation

(N)b

Where, N = No. to be represented

b = base or radix

Range = (0 to b – 1) i.e. N can be b/w (0 to b – 1)

Commonly used Number system

 Decimal No. System

 Binary Number System

 Octal Number System

 Hexadecimal Number System

Decimal No. System

 Base i.e. ‘b’ is 10

 (N)10 for eg. (301)10

 Range (0 – 9) i.e. N can contain digits b/w (0 – 9)

 Value of digit depends upon its position

DIGITAL ELECTRONICS | Number System Representation PAGE 2


Download Testbook App

*LSD is least Significant Bit.

Binary Number System

 Base i.e. ‘b’ is 2

 (N)2 i.e. (1011)2

 Range (0 – 1) i.e. N can contain only (0, 1)

 This 0, 1 in Binary system is known as bits

 Group of 4 bits = 1 Nibble

Group of 8 bits = 1 byte

 Follows positional value system i.e. Binary number can be converted to Decimal
equivalent by summary the weight of various position in binary number which
contain bit ‘1’

DIGITAL ELECTRONICS | Number System Representation PAGE 3


Download Testbook App

Octal Number System


 Base i.e. ‘b’ is 8

 (N)8 i.e. (367)8

 Range (0 – 7) i.e. N can contain digits b/w (0 – 7)

 Octal Number is converted to Decimal equivalent by summery together the


positional weight of each octal digit.

Hexadecimal Number System

 Base i.e. ‘b’ is 16

 Also known as Alpha Numeric Number system

 Range (0 – 15)

DIGITAL ELECTRONICS | Number System Representation PAGE 4


Download Testbook App

Number System Conversion

Decimal to any Number system


Decimal Number

 Integer part – Divide the integer part by ‘base’ {2, 16, 8} & write the
remainder until quotient obtained is zero.

 Fractional part – Multiply the fraction part by ‘base’ {2, 16, 8} & write the
integer part till we get fraction equal to zero or we get the repeated pattern.

Decimal to Binary

 (43.90625)10 → (101011 ⋅ 111010)2

Remainder
43 ÷ 2 → 1 (LSB)
21 ÷ 2 → 1 ↑
10 ÷ 2 → 0
5÷2 1

2÷2 0

1÷2 1 (MSB)

(43)10 → (101011)2

DIGITAL ELECTRONICS | Number System Representation PAGE 5


Download Testbook App

‘Integer’
0.90625 × 2 = 1.8125 → 1 ↓
0.8125 × 2 = 1.625 → 1
0.625 × 2 = 1.25 → 1
0.25 × 2 = 0.5 0

0.5 × 2 = 1.0 1

0.0 × 2 = 0.0 0

Now fraction become ‘0’
(0.90625)10 → (0.111010)2

Decimal to octal

(43.30)10 → (53.23146)8

Reminder

(43)10 → (53)8

Any Number system to Decimal Number system

Binary to Decimal

(1101.01)2 ⇒ 13 + 0.25 = (13.25)10

Octal to Decimal

(46.2)8 ⇒ 38 + 0.25 = (38.25)10

DIGITAL ELECTRONICS | Number System Representation PAGE 6


Download Testbook App

Hexadecimal to Decimal

= 231 + 0.125

= (231.125)10

Hexadecimal to Binary
Replace hexadecimal Number by its 4 bit binary equivalent.

(4AF)16 → (0100 1010 1111)2

Octal to Binary
→ Replace Octal Number by its 3 bit binary equivalent

(376)8 → (011 111 110)2

Binary to Octal
Group the binary bit stream in to pairs of ‘3’ by starting it from LSB.

Binary to Hexadecimal
Group the binary bit stream into pairs of ‘4’ by starting it from LSB

DIGITAL ELECTRONICS | Number System Representation PAGE 7


Download Testbook App

Octal to Hexadecimal
→ Convert octal to Binary number

→ Perform Binary to Hexadecimal conversion

Hexadecimal to Octal
→ Convert Hexadecimal to Binary Number

→ Perform Binary to octal conversion

Signal Number Representation

DIGITAL ELECTRONICS | Number System Representation PAGE 8


Download Testbook App

 This is useful for the representation of negative Number

 Mostly used are: -

→ Sign Magnitude Representation

→ 1’s complement representation

→ 2’s complement Representation

Signed Magnitude 1st Complement 2nd Complement

MSB is a sign bit -ve no. is +ve no. is represented in 2st


For -ve no., sign bit = 1 represented in 1st complement form.
For +ve no., sign bit = 0 complement form

Two pattern for ‘0’ Two pattern for ‘0’ Single pattern for ‘0’

Use different hardware for Use same hardware Use same hardware for addition and
addition and subtraction for addition and subtraction
subtraction

Weighted No. System Non weighted Weighted no. system

Do not assign weight to sign Assign weight to sign bit i.e.,


bit - -ve weight to sign bit
+ve weight to rest bits

Sign bit does not involve in Sign bit involve in Sign bit involve in computation.
computation computation

Testbook Trick
 For signed number extension

Signed Magnitude 1st and 2nd complement


→ copy ‘sign bit’ b/w sign bit and
→ put ‘0’ b/w sign bit and successive bit
successive bit

DIGITAL ELECTRONICS | Number System Representation PAGE 9


Download Testbook App

Codes

Codes
Non Binary Binary alphanumeric
Morse code → Gray code → ASCII code
→ Excess 3 code → EBCDIC code
→ BCD code
→ 8421 code

Weighted Codes

→ 8421

→ BCD

→ Binary, Hex, oct

Non weighted codes

→ excess 3

→ Gray code

Self-complementary codes

→ They are weighted code with sum of weight = 9 and They have property that 9’s
complement of decimal no. is obtained directly by complementing each bit in the
pattern.

Eg. 2421, excess 3, 8 4 -2 -1, 5211, 4311, 3321

DIGITAL ELECTRONICS | Number System Representation PAGE 10


Download Testbook App

Testbook Trick
 Excess 3 is the only Non-weighted code which is self-complementing.

BCD code (Binary code Decimal)

→ Each digit of decimal Number is represented by binary equivalent

→ Also known as 8421 code or 4 bit binary code.

→ during arithmetic operation of invalid BCD is present then add 0110 to get correct
result

Excess 3 code

→ BCD + 3 = Excess 3 code

For e.g.

Gray code
→ Also known as cyclic code, Minimum error code, Reflective code.

→ In this code, only one bit in the code group changes when going from one step to
next.

DIGITAL ELECTRONICS | Number System Representation PAGE 11


Download Testbook App

Binary to Gray code

Gray code to Binary

Points to Remember
 Gray codes are not suitable for arithmetic operations.

 Excess 3 code arithmetic operation used to perform BCD subtraction

 Largest no. that can be represented using N bits = (2N - 1)10

 BCD code is used in counters, Digit clocks etc.

DIGITAL ELECTRONICS | Number System Representation PAGE 12

You might also like