CIS 3360 Security in Computing
Spring 2010
Handout – Number Systems and Signed Arithmetic
Decimal Number System
In the decimal system (Base 10) that you are well familiar with, any number can be
represented by a combination of any ten digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Examples:
500, 32, 10, 54
Sometimes, when dealing with multiple bases, the subscript 10 is written with the
decimal number. For example, 32
10
or 54
10
, etc.
Binary Number System
In the binary system (Base 2), you can represent any number using two digits: 0 and 1
Examples:
100000
2
= 32
10
1010
2
= 10
10
110110
2
= 54
10
Octal Number System
In the octal system (Base 8), you can represent any number using eight digits:
0, 1, 2, 3, 4, 5, 6, and 7
Note that three binary bits are sufficient to represent any of the eight digits, as 2
3
= 8.
Examples:
40
8
= 32
10
12
8
= 10
10
66
8
= 54
10
Hexadecimal Number System
In the hexadecimal system (Base 16), you can represent any number using sixteen digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Note that four binary bits are sufficient to represent any of the sixteen digits, as 2
4
= 16.
Hexadecimal numbers are usually written with a
0x
prefix or an
h
suffix, if the base is not
present in the subscript. For example:
0x
EF01 or F301
h
or 78AB
16
Examples:
20
16
= 32
10
A
16
= 10
10
36
16
= 54
10
Prepared by: Shafaq Chaudhry