You are on page 1of 5

D

Number
Systems
Here are only numbers
ratied.
William Shakespeare

Nature has some sort of


arithmetic-geometrical
coordinate system, because
nature has all kinds of
models. What we experience
of nature is in models, and
all of natures models are so
beautiful.
It struck me that natures
system must be a real beauty,
because in chemistry we nd
that the associations are
always in beautiful whole
numbersthere are no
fractions.
Richard Buckminster Fuller

OBJECTIVES
In this appendix you will learn:

To understand basic number systems concepts, such as


base, positional value and symbol value.
To understand how to work with numbers represented in
the binary, octal and hexadecimal number systems.
To abbreviate binary numbers as octal numbers or
hexadecimal numbers.
To convert octal numbers and hexadecimal numbers to
binary numbers.
To convert back and forth between decimal numbers and
their binary, octal and hexadecimal equivalents.
To understand binary arithmetic and how negative
binary numbers are represented using twos complement
notation.

2006 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.

Appendix D Number Systems


D.1
D.2
D.3
D.4
D.5
D.6

Introduction
Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
Converting Octal and Hexadecimal Numbers to Binary Numbers
Converting from Binary, Octal or Hexadecimal to Decimal
Converting from Decimal to Binary, Octal or Hexadecimal
Negative Binary Numbers: Twos Complement Notation

Summary | Terminology | Self-Review Exercises | Answers to Self-Review Exercises | Exercises

Instructors Manual
Self-Review Exercises
D.1

The bases of the decimal, binary, octal and hexadecimal number systems are
,
and
respectively.
ANS: 10, 2, 8, 16.

D.2
In general, the decimal, octal and hexadecimal representations of a given binary number
contain (more/fewer) digits than the binary number contains.
ANS: Fewer.
D.3
(True/False) A popular reason for using the decimal number system is that it forms a convenient notation for abbreviating binary numbers simply by substituting one decimal digit per
group of four binary bits.
ANS: False. Hexadecimal does this.
D.4
The (octal / hexadecimal / decimal) representation of a large binary value is the most concise
(of the given alternatives).
ANS: Hexadecimal.
D.5
D.6

(True/False) The highest digit in any base is one more than the base.

ANS: False. The highest digit in any base is one less than the base.

(True/False) The lowest digit in any base is one less than the base.

ANS: False. The lowest digit in any base is zero.

D.7
The positional value of the rightmost digit of any number in either binary, octal, decimal
or hexadecimal is always
.
ANS: 1 (the base raised to the zero power).
D.8
The positional value of the digit to the left of the rightmost digit of any number in binary,
octal, decimal or hexadecimal is always equal to
.
ANS: The base of the number system.
D.9
Fill in the missing values in this chart of positional values for the rightmost four positions
in each of the indicated number systems:
decimal
hexadecimal
binary
octal

1000
...
...
512

100
256
...
...

10
...
...
8

1
...
...
...

ANS:

2006 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.

Self-Review Exercises
decimal
hexadecimal
binary
octal
D.10
D.11
D.12

1000
4096
8
512

100
256
4
64

10
16
2
8

1
1
1
1

Convert binary 110101011000 to octal and to hexadecimal.

ANS: Octal 6530; Hexadecimal D58.

Convert hexadecimal FACE to binary.

ANS: Binary 1111 1010 1100 1110.

Convert octal 7316 to binary.


ANS: Binary 111 011 001 110.

D.13 Convert hexadecimal 4FEC to octal. [Hint: First convert 4FEC to binary, then convert that
binary number to octal.]
ANS: Binary 0 100 111 111 101 100; Octal 47754.
D.14
D.15
D.16
D.17

Convert binary 1101110 to decimal.


ANS: Decimal 2+4+8+32+64=110.
Convert octal 317 to decimal.

ANS: Decimal 7+1*8+3*64=7+8+192=207.

Convert hexadecimal EFD4 to decimal.

ANS: Decimal 4+13*16+15*256+14*4096=61396.

Convert decimal 177 to binary, to octal and to hexadecimal.

ANS: Decimal 177

to binary:

256 128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
(1*128)+(0*64)+(1*32)+(1*16)+(0*8)+(0*4)+(0*2)+(1*1)
10110001

to octal:
512 64 8 1
64 8 1
(2*64)+(6*8)+(1*1)
261

to hexadecimal:
256 16 1
16 1
(11*16)+(1*1)
(B*16)+(1*1)
B1

D.18 Show the binary representation of decimal 417. Then show the ones complement of 417
and the twos complement of 417.
ANS: Binary:
512 256 128 64 32 16 8 4 2 1
256 128 64 32 16 8 4 2 1
(1*256)+(1*128)+(0*64)+(1*32)+(0*16)+(0*8)+(0*4)+(0*2)+(1*1)
110100001

2006 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.

Appendix D Number Systems


Ones complement: 001011110
Twos complement: 001011111
Check: Original binary number + its twos complement
110100001
001011111
--------000000000

D.19

What is the result when a number and its twos complement are added to each other?

ANS: Zero.

Exercises
D.1
Some people argue that many of our calculations would be easier in the base 12 number
system because 12 is divisible by so many more numbers than 10 (for base 10). What is the lowest
digit in base 12? What would be the highest symbol for the digit in base 12? What are the positional
values of the rightmost four positions of any number in the base 12 number system?
ANS: The lowest digit is 1. The highest symbol is C. 1728, 144, 12, 1.

D.2
Complete the following chart of positional values for the rightmost four positions in each
of the indicated number systems:
decimal
base 6
base 13
base 3

1000
...
...
27

100
...
169
...

10
6
...
...

1
...
...
...

1000
216
2197
27

100
36
169
9

10
6
13
3

1
1
1
1

ANS:

decimal
base 6
base 13
base 3
D.3
D.4

Convert binary 100101111010 to octal and to hexadecimal.

ANS: Octal 4572, Hexadecimal 97A.

Convert hexadecimal 3A7D to binary.


ANS: 11101001111101.

D.5
Convert hexadecimal 765F to octal. [Hint: First convert 765F to binary, then convert that
binary number to octal.]
ANS: 73137.

D.6
D.7
D.8
D.9

Convert binary 1011110 to decimal.


ANS: 94.

Convert octal 426 to decimal.

ANS: 278.

Convert hexadecimal FFFF to decimal.

ANS: 65535.

Convert decimal 299 to binary, to octal and to hexadecimal.

ANS: Binary 100101011, Octal 453, Hexadecimal 12B.

2006 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.

Exercises

D.10 Show the binary representation of decimal 779. Then show the ones complement of 779
and the twos complement of 779.
ANS: Binary

1100001011,
0011110101.

D.11

Ones

complement

0011110100,

Twos

complement

Show the twos complement of integer value 1 on a machine with 32-bit integers.
ANS: 00000000000000000000000000000001.

2006 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.

You might also like