Download presentation

Presentation is loading. Please wait.

1

2
numbers

3
BY SA

4

5

6

7

8

9

10

11
0 1 bit (one of two states)

12

13
number system (a scheme for symbolically and verbally representing quantity)

14
unary (the tally system)

15

16
positional notation (represents arbitrarily large quantities using a finite set of symbols)

17
decimal base-10 (positional notation using 10 symbols)

18
Arabic numerals

19
39 40

20
…

21

22

23
78 seventy-eight seven eight

24

25
octal base-8 (positional notation using 8 symbols)

26

27

28
octal base-8 decimal base-10

29
octal base-8 decimal base-10

30

31
61 (decimal) 061 (octal)

32
05673

33
hexadecimal hex base-16 (positional notation using 16 symbols)

34
A B C D E F

35
0F0F 10

36
ABC ABC hex base-16 decimal base-10

37
D E F hex base-16 decimal base-10

38
19 1A 1B 1C 1D 1E 1F hex base-16 decimal base-10

39
ADD BAD BEAD BEE BEEF CAFE DEAD DEAF DEED FAD FEED

40
0xADD 0xBAD 0xBEAD 0xBEE 0xBEEF 0xCAFE 0xDEAD 0xDEAF 0xDEED 0xFAD 0xFEED

41
0xA3BFFFFF 0xA3C00000

42
binary base-2 (positional notation using 2 symbols)

43
0 1

44

45
binary base-2 decimal base-10

46
binary base-2 decimal base

47
101b (binary) 101 (decimal)

48
b b

49

50
base conversions

51
36259

52
(30000) + (6000) + (200) + (50) + (9)

53
(3 * 10000) + (6 * 1000) + (2 * 100) + (5 * 10) + (9 * 1)

54
(3 * 10 4 ) + (6 * 10 3 ) + (2 * 10 2 ) + (5 * 10 1 ) + (9 * 10 0 )

55

56
octal to decimal

57
03675

58
(03000) + (0600) + (070) + (05)

59
(03 * 01000) + (06 * 0100) + (07 * 010) + (05 * 01)

60
(03 * ) + (06 * ) + (07 * ) + (05 * )

61
(3 * 8 3 ) + (6 * 8 2 ) + (7 * 8 1 ) + (5 * 8 0 )

62
(3 * 512) + (6 * 64) + (7 * 8) + (5 * 1)

63
(1636) + (384) + (56) + (5)

64
03675 = 2081

65
decimal to octal

66
36256

67
(3 * 10 4 ) + (6 * 10 3 ) + (2 * 10 2 ) + (5 * 10 1 ) + (6 * 10 0 )

68
(03 * ) + (06 * ) + (02 * ) + (05 * ) + (06 * )

69
(03 * ) + (06 * 01750) + (02 * 0144) + (05 * 012) + (06 * 01)

70
(072460) + (013560) + (0310) + (062) + (06)

71
36256 =

72
hex to decimal

73
0x36E59

74
(0x3 * 16 4 ) + (0x6 * 16 3 ) + (0xE * 16 2 ) + (0x5 * 16 1 ) + (0x9 * 16 0 )

75
(3 * 65536) + (6 * 4096) + (14 * 256) + (5 * 16) + (9 * 1)

76
(196608) + (24576) + (3584) + (80) + (9)

77
0x36E59 =

78
binary to decimal

79
10101b

80
(1 * 2 4 ) + (0 * 2 3 ) + (1 * 2 2 ) + (0 * 2 1 ) + (1 * 2 0 )

81
(1 * 16) + (0 * 8) + (1 * 4) + (0 * 2) + (1 * 1)

82
(16) + (0) + (4) + (0) + (1)

83
10101b = 21

84
b

85

86
(128) + (32) + (8) + (4) + (1)

87
b = 173

88

89
decimal to binary

90
1)find biggest fitting power of two 2)subtract it out 3)repeat until left with 0

91
35872

92
32768 (2 15 )

93
1???????????????b

94
= 3104

95
2048 (2 11 )

96
10001???????????b

97
3104 – 2048 = 1056

98
1024 (2 10 )

99
100011??????????b

100
1056 – 1024 = 32

101
32 (2 5 )

102
?????b

103
32 – 32 = 0

104
b

105
why use hex and octal?

106
octal to binary (and vice versa)

107
octal base-8 binary base-2

108
03673

109
octal base-8 binary base-2

110
b

111
b

112
b 01526

113
hex to binary (and vice versa)

114
ABCDEF ABCDEF hex base-16 binary base-2

115
0x7E b

116
b 0x32D

117
recap Each digit is a coefficient of the number base raised to an increasing power. One technique works for all number base conversions. Shortcut conversions: decimal to binary (sum powers of 2) binary to decimal (subtract out powers of 2) octal and binary (1 octal digit = 3 binary digits) hex and binary (1 hex digit = 4 binary digits) Effectively, hex and octal serve as a compacter way of writing binary.

118

119
meaning relies upon agreement

120
integer (whole number)

121
signed integer unsigned integer

122
0, 1, 2, 3, 4, 5… 0b, 1b, 10b, 11b, 100b, 101b…

123
n bits = 2 n values 1 bit = 2 values 2 bits = 4 values 3 bits = 8 values 4 bits = 16 values 5 bits = 32 values 6 bits = 64 values 7 bits = 128 values 8 bits = 256 values etc…

124
unsigned value range 1 bit = bits = bits = bits = bits = bits = bits = bits = etc…

125
(negative three) (positive three) sign bit

126
(negative three) (positive three) one’s complement

127
(negative three) (positive three) two’s complement

128
(positive three) (negative three) two’s complement

129
(negative three in excess-8) (positive three in excess-8) excess-n

130
(negative three in excess-42) (positive three in excess-42) excess-n

131
sign bit: -127 to +127 one’s complement: -127 to +127 two’s complement: -128 to bit range

132
rational numbers 2/5 1/98 7/1 -61/1738

133
radix-point notation (ratio written as an integer component and a fractional component, separated by a radix point) 3/4 1/8 -7/1 138/

134
36.259

135
(30) + (6) + (0.2) + (0.05) + (0.009)

136
(3 * 10 1 ) + (6 * 10 0 ) + (2 * ) + (5 * ) + (9 * )

137
/101/1001/1000

138
/81/641/512

139
10.111b /21/41/8

140
finite rational (rational with a fractional component which can be expressed with a finite number of digits) 3/4 -7/1 138/20 1/3 738/ …

141
a ratio with denominator 2 a 5 b is finite in decimal a ratio with denominator 2 a is finite in octal a ratio with denominator 2 a is finite in hex a ratio with denominator 2 a is finite in binary all ratios which are finite in binary are also finite in decimal some ratios which are finite in decimal are also finite in binary

142
rational as two integers 3/4 Numerator: Denominator: /13 Numerator: Denominator:

143
fixed-point 57/ b Integer: Fraction: (the computing equivalent of radix-point notation)

144
scientific notation engineering notation = * = * = * 10 5

145
floating-point 21/ b b * 2 3 Significand: Exponent: (the computing equivalent of scientific notation)

146
6.75

147
110b + 0.?b

148
0.75 3/4

149
1/2 + 1/

150
6.75 = b

151
= b * 2 2

152
Significand: Exponent:

153
IEEE floating-point (an international standard)

154

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google