[go: up one dir, main page]

0% found this document useful (0 votes)
16 views16 pages

Lecture 3 Number System 3

The document covers number system conversions between binary, octal, decimal, and hexadecimal formats. It provides examples of converting numbers from one base to another, including fractional parts, and explains the methods for these conversions. Key concepts include binary to octal and hexadecimal conversions, as well as decimal to other bases.

Uploaded by

goutam sanyal
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)
16 views16 pages

Lecture 3 Number System 3

The document covers number system conversions between binary, octal, decimal, and hexadecimal formats. It provides examples of converting numbers from one base to another, including fractional parts, and explains the methods for these conversions. Key concepts include binary to octal and hexadecimal conversions, as well as decimal to other bases.

Uploaded by

goutam sanyal
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/ 16

Course :Computer Class :

System Sem-1
Architecture

Lesson :Number System


Contd..

By :Goutam Sanyal
Binary  Octal

(011 010 101 000 . 111 101 011 100)2

(3 2 5 0 . 7 5 3 4 )8
Dec Binary Hexadecimal

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F
Binary  Hex

( 0110 1010 1000 . 1111 0101 1100 )2

( 6 A 8 . F 5 C )16
Any base to decimal
conversion
Example

The following shows how to convert the binary number (110.11)2 to decimal:
(110.11)2 = 6.75.
Example

The following shows how to convert the hexadecimal number (1A.23)16


to decimal.

Note that the result in the decimal notation is not exact, because

3 × 16−2 = 0.01171875. We have rounded this value to three digits (0.012).


Example

The following shows how to convert (23.17) to decimal.


8

This means that (23.17)8 ≈ 19.234 in decimal. Again, we have rounded


up 7 × 8−2 = 0.109375.
Convert Decimal to any base r

• Fractional part: Multiply by the base, keep track of integer part,


and read-down
• e.g. (0.78125)10 = ( ? )16 , r = 16

.78125 * 16= 12.5 12 C

.5 * 16= 8 8 8

(0.78125)10 = (0.C8)16
Decimal to Binary Conversion
(Fractional Part)

.3125 *2 0.625 0
.625 *2 1.25 1
.25 *2 0.5 0
.5 *2 1 1

.312510=.01012
Decimal to Binary Conversion
(Fractional Part: Repeated Multiplication)

.1  2 ➔0.2 (fractional part = .2, whole part = 0)


.2  2 ➔0.4 (fractional part = .4, whole part = 0)
.4  2 ➔0.8 (fractional part = .8, whole part = 0)
.8  2 ➔1.6 (fractional part = .6, whole part = 1)
.6  2 ➔1.2 (fractional part = .2, whole part = 1)

Result = .000110001100011000112…..
Decimal to Octal Conversion
(Fractional Part)

.3125 *8= 2.5 2

.5 * 8= 4.0 4

.312510=.248
Decimal to Octal Conversion
(Fractional Part: Repeated Multiplication)
The following shows how to convert 0.634 to octal using a maximum of
four digits. The result is 0.634 = (0.5044)8. Note that we multiple by 8
(base octal).

.634 X8 = 5.072 5
.072 X8 =0.576 0
.576 X8 =4.608 4
.608 X8 = 4.864 4
Decimal to Hexadecimal Conversion
(Fractional Part: Repeated Multiplication)

The following shows how to convert 178.6 in decimal to hexadecimal


using only one digit to the right of the decimal point. The result is
178.6 = (B2.9)16 Note that we divide or multiple by 16 (base
hexadecimal).
Thank You

You might also like