number setetertystems i_
TRANSCRIPT
![Page 1: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/1.jpg)
1. Number Systems
TICO
![Page 2: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/2.jpg)
Common Number Systems
System Base
SymbolsUsed by humans?
Used in computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa-decimal
16 0, 1, … 9,A, B, … F
No No
![Page 3: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/3.jpg)
Conversion Among Bases
• The possibilities:
Hexadecimal
Decimal Octal
Binary
pp. 40-46
![Page 4: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/4.jpg)
Quick Example
2510 = 110012 = 318 = 1916
Base
![Page 5: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/5.jpg)
Decimal to Decimal (just for fun)
Hexadecimal
Decimal Octal
Binary
Next slide…
![Page 6: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/6.jpg)
12510 => 5 x 100 = 52 x 101 = 201 x 102 = 100
125
Base
Weight
![Page 7: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/7.jpg)
Binary to Decimal
Hexadecimal
Decimal Octal
Binary
![Page 8: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/8.jpg)
Binary to Decimal
• Technique– Multiply each bit by 2n, where n is the “weight”
of the bit– The weight is the position of the bit, starting
from 0 on the right– Add the results
![Page 9: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/9.jpg)
Example
1010112 => 1 x 20 = 11 x 21 = 20 x 22 = 01 x 23 = 80 x 24 = 01 x 25 = 32
4310
Bit “0”
![Page 10: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/10.jpg)
Decimal to Binary
Hexadecimal
Decimal Octal
Binary
![Page 11: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/11.jpg)
Decimal to Binary
• Technique– Divide by two, keep track of the remainder– First remainder is bit 0 (LSB, least-significant
bit)– Second remainder is bit 1– Etc.
![Page 12: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/12.jpg)
Example12510 = ?2
2 125 62 12 31 02 15 12 7 12 3 12 1 12 0 1
12510 = 11111012
![Page 13: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/13.jpg)
Decimal to Octal
Hexadecimal
Decimal Octal
Binary
![Page 14: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/14.jpg)
Decimal to Octal
• Technique– Divide by 8– Keep track of the remainder
![Page 15: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/15.jpg)
Example123410 = ?8
8 1234 154 28 19 28 2 38 0 2
123410 = 23228
![Page 16: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/16.jpg)
Octal to Decimal
Hexadecimal
Decimal Octal
Binary
![Page 17: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/17.jpg)
Octal to Decimal
• Technique– Multiply each bit by 8n, where n is the “weight”
of the bit– The weight is the position of the bit, starting
from 0 on the right– Add the results
![Page 18: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/18.jpg)
Example
7248 => 4 x 80 = 42 x 81 = 167 x 82 = 448
46810
![Page 19: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/19.jpg)
Hexadecimal to Decimal
Hexadecimal
Decimal Octal
Binary
![Page 20: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/20.jpg)
Hexadecimal to Decimal
• Technique– Multiply each bit by 16n, where n is the
“weight” of the bit– The weight is the position of the bit, starting
from 0 on the right– Add the results
![Page 21: Number setetertystems i_](https://reader031.vdocument.in/reader031/viewer/2022021422/58ede7f71a28ab16678b46f5/html5/thumbnails/21.jpg)
Example
ABC16 => C x 160 = 12 x 1 = 12 B x 161 = 11 x 16 = 176 A x 162 = 10 x 256 = 2560
274810