Number Systems
Tom Kelliher, CS 220
Sept. 5, 2003
Read 1.3 of Mano.
- Number systems: decimal, binary, hexadecimal.
- Number ranges.
Base conversion and character representation.
Positional, weighted number systems. Example of a non-weighted number
system: Roman numerals. Example of non-positional non-weighted number
system: unary.
Radix, digit set.
- Radix 10, digit set 0--9.
- .
Radix point.
- General case:
We can substitute any radix and digit set we want.
- Radix 2, digit set: 0, 1.
- Decimal values of , , and ?
Binary point
- Powers of two. K, M, and G.
(Octal is similar --- study on your own.)
- Radix 16, digit set: 0--9, A--F.
- Generally used as compact binary form.
How? --- Powers of two.
- C Constants:
0XFE23
, 0x89ab
. (0567
).
- Relationship to binary and decimal.
.
- Range of values which can be represented.
Meaning of unsigned.
- Consider an n-bit number. How many values can be represented?
What is the range of values for an n-bit unsigned number?
- What is the range of values of an 8-bit unsigned number?
Convert the following binary numbers to hexadecimal and decimal:
- 11100111
- 00111010
- 11000111
- 00011111
- 11101110
Thomas P. Kelliher
Wed Sep 3 11:07:49 EDT 2003
Tom Kelliher