Appendix A. Numbering Systems; Binary And Hexadecimal; Conversion; Binary Number Notation - IBM System/32 Introduction And Maintenance Manual

Table of Contents

Advertisement

Appendix A. Numbering Systems
BINARY AND HEXADECIMAL
CONVERSION
Binary Number Notation
The binary numbering system uses a base of
two. The concept of using a base two can be
compared with the base ten for the (decimal)
numbering system. The following table shows
the binary equivalents for decimal numbers
from 0 through 9:
Decimal
Binary
Number
Number
0
0
1
1
2
10
3
11
4
100
5
101
6
110
7
111
8
1000
9
1001
Example of a decimal number:
+9 units
=-=:oJ
+30 tens - - - - '
+200 hundreds
+1000 thousands - -.....
1239
=
decimal number
As shown above, the decimal numbering system
allows counting to ten in each position-from
units to tens to hundreds to thousands, etc.
The binary system allows counting to two in
each position. Register displays are binary: a
bit light on is a 1; a bit light off is a O.
Example of a binary number:
I
0
0
+0001
=
decimal
~~~~~~
+0000
=
deci mal
or
+0000
=
decimal
1000
=
decimal
1001
=
decimal
~~
0
8
9
Hexadecimal Numbering System
Binary numbers require about three times as
many positions as decimal numbers to express
the equivalent number. This is not much of a
problem for the computer; however, in talking
and writing or in communicating with the com-
puter, binary numbers are bulky.
A long string of 1's and O's cannot be effectively
transmitted from one individual to another.
Some shorthand method is necessary. The hexa-
decimal numbering system fills this need.
Because of the simple relationship of hexadecimal
to binary, numbers can be converted from one
system to another by inspection. The base of the
hexadecimal system is 16. This means there are
16 symbols: 0,1,2,3,4,5,6,7,8,9, A, B, C,
D, E, and F. The letters A, B, C, D, E, and F
represent the base 10 (decimal) values of 10, 11,
12,13,14, and 15, respectively.
Four binary positions are equivalent to one hexa-
decimal position. The following table shows the
comparable values of the three number systems:
Decimal
Binary
Hex
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
At this point, all 16 symbols were used, and a
carry to the next higher position of the number
is necessary. For example:
Decimal
Binary
Hex
16
0001 0000
10
17
0001 0001
11
18
0001 0010
12
19
0001 0011
13
20
0001 0100
14
21
0001 0101
15
-and so on-
The internal circuitry of the computer under-
stands only binary. But an operator can look
at a series of lights showing binary 1's and O's, for
example: 0001 11100001 0011, and interpret
the lights to represent the hex value 1E13, which
is easier to state than the string of 1's and O's.
Numbering Systems
A-1

Advertisement

Table of Contents
loading

Table of Contents