Chapter02 2-1
Chapter02 2-1
Chapter02 2-1
*
Chapter Goals
*
24
6
Numbers
Natural Numbers
Zero and any number obtained by repeatedly adding
one to it.
Negative Numbers
A value less than 0, with a – sign
*
2
Numbers
Integers
A natural number, a negative number, zero
Rational Numbers
An integer or the quotient of two integers
*
3
Natural Numbers
600 + 40 + 2 ?
Or is it
384 + 32 + 2 ?
Or maybe…
1536 + 64 + 2 ?
*
4
Natural Numbers
Aha!
*
5
Positional Notation
642 is 63 * 102 + 42 * 10 + 21
*
7
Positional Notation
*
8
6
Binary
What bases can these numbers be in? 122, 198, 178, G1A4
*
9
Bases Higher than 10
*
10
Converting Octal to Decimal
6 x 82 = 6 x 64 = 384
+ 4 x 81 = 4 x 8 = 32
+ 2 x 8º = 2 x 1 = 2
= 418 in base 10
*
11
Converting Hexadecimal to Decimal
*
13
Arithmetic in Binary
1 + 1 is 0 with a carry
Carry Values
111111
1010111
+1 0 0 1 0 1 1
10100010
*
14
Subtracting Binary Numbers
12
202
1010111
- 111011
0011100
*
15
a) Hexadecimal to decimal
101
A0C
a)Binary Arithmetic
111 + 101
1001 - 11
Counting in Binary/Octal/Decimal
*
Converting Binary to Octal
*
17
Converting Binary to Hexadecimal
10101011 is AB in base 16
*
18
Converting Decimal to Octal
Try some!
*
Abacus
*
Converting Decimal to Other Bases
*
19
Converting Decimal to Octal
Try it!
*
Converting Decimal to Octal
248 31 3 0
8 1988 8 248 8 31 8 3
16 24 24 0
38 08 7 3
32 8
68 0
64
4
Answer is : 3 7 0 4
*
Converting Decimal to Hexadecimal
Try it!
*
20
Converting Decimal to Hexadecimal
222 13 0
16 3567 16 222 16 13
32 16 0
36 62 13
32 48
47 14
32
15
DEF
*
21
Binary Numbers and Computers
Low Voltage = 0
High Voltage = 1 all bits have 0 or 1
*
22
Binary and Computers
Byte
8 bits
• 32-bit machines
• 64-bit machines etc.
*
23