0% found this document useful (0 votes)
58 views38 pages

Binary Number Representations On Computers

This document discusses binary number representations that are useful for computers. It covers converting between decimal, binary, octal and hexadecimal numbering systems. Examples are provided for converting specific numbers between these different bases. Key topics include converting a decimal number to binary by dividing by 2 repeatedly, and converting a fractional decimal number to a binary representation by multiplying by 2 repeatedly. Binary arithmetic and two's complement representations for positive and negative numbers are also introduced.

Uploaded by

tazeb Abebe
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)
58 views38 pages

Binary Number Representations On Computers

This document discusses binary number representations that are useful for computers. It covers converting between decimal, binary, octal and hexadecimal numbering systems. Examples are provided for converting specific numbers between these different bases. Key topics include converting a decimal number to binary by dividing by 2 repeatedly, and converting a fractional decimal number to a binary representation by multiplying by 2 repeatedly. Binary arithmetic and two's complement representations for positive and negative numbers are also introduced.

Uploaded by

tazeb Abebe
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/ 38

Lecture 2

Binary Number Representations on Computers


10/30/2018

T/F

Fundamentals of Computers

2
10/30/2018

Fundamentals of Computers

3
10/30/2018

4
Useful Number Systems for Computers

Fundamentals of Computers

5
10/30/2018

Fundamentals of Computers

6
10/30/2018
10/30/2018

8
9
10/30/2018

Fundamentals of Computers

10
10/30/2018

11
10/30/2018

12
10/30/2018

13
Decimal to Binary
Decimal to Binary
E.g. Let's express a decimal number 1341 in binary notation.
Decimal to Octal
10/30/2018

16
Decimal to Hexadecimal
Hexadecimal to Decimal

Fundamentals of Computers

18
Octal to Binary

Hexadecimal to Binary

19
Binary to Octal

Binary to Hexadecimal

20
10/30/2018

Octal to Hexadecimal

21
Examples

1. Convert the following decimal numbers into binary and hexadecimal numbers:
a 108
b 4848
c 9000
2. Convert the following binary numbers into hexadecimal and decimal numbers:
a 1000011000
b 10000000
c 101010101010
3. Convert the following hexadecimal numbers into binary and decimal numbers :
a ABCDE
b 1234
c 80F

24
Answers
1. 1101100B, 1001011110000B, 10001100101000B,
6CH, 12F0H, 2328H.

2. 218H, 80H, AAAH,


536D, 128D, 2730D.

3. 10101011110011011110B, 1001000110100B, 100000001111B,


703710D, 4660D, 2063D.
24
10/30/2018

25
Example
Convert 18.6875D to binary
Integral Part = 18D
18/2 => quotient=9 remainder=0
9/2 => quotient=4 remainder=1
4/2 => quotient=2 remainder=0
2/2 => quotient=1 remainder=0
1/2 => quotient=0 remainder=1
(quotient=0 stop)
Hence, 18D = 10010B
Fractional Part = .6875D
.6875*2=1.375 => whole number is 1
.375*2=0.75 => whole number is 0
.75*2=1.5 => whole number is 1
.5*2=1.0 => whole number is 1
Hence .6875D = .1011B
Therefore, 18.6875D = 10010.1011B
27
28
E.g. 14x13=182

=182
30
10/30/2018

31
10/30/2018

32
10/30/2018

-6
-9 ?

33
10/30/2018

13 -13

34
Example

+6 00000110 -6 11111010
+13 00001101 +13 00001101
+19 00010011 +7 00000111

+6 00000110 -6 11111010
-13 11110011 -13 11110011
-7 11111001 -19 11101101
10/30/2018

Fundamentals of Computers

36
1. Convert the decimal number 3315 to hexadecimal notation. What about
the hexadecimal equivalent of the decimal number 3315.3?
2. (59.125)10=(? )2
3. 4. (0.001)2=(?)10
4. (266)10= (?)8
5. 1111001 + 111111=?
6. 11011 * 111=?
Questions??

End!!

10/30/2018 Fundamentals of Computers 38

You might also like