Difference between revisions of "CS Terms - Getting Started"
(→Storage) |
(→Binary/Hex/integer limits) |
||
Line 9: | Line 9: | ||
* TB - terabyte, 1 trillion bytes | * TB - terabyte, 1 trillion bytes | ||
− | = | + | =Base systems= |
+ | * Able to convert between decimal, binary, hexadecimal, octal | ||
* 15 = 1111 binary = F hex | * 15 = 1111 binary = F hex | ||
* 255 = 1111 1111 binary = FF hex | * 255 = 1111 1111 binary = FF hex | ||
− | * unsigned 8 bit integer | + | * unsigned 8 bit integer ranges from 0 to 255 |
* signed 8 bit integer is between -128 and 127 | * signed 8 bit integer is between -128 and 127 | ||
* unsigned 32 bit integer ranges from 0 to 2<sup>32</sup>-1, about 4 billion | * unsigned 32 bit integer ranges from 0 to 2<sup>32</sup>-1, about 4 billion | ||
* signed 32 bit integer ranges from -2<sup>31</sup> to 2<sup>31</sup>-1, about +/-2 billion | * signed 32 bit integer ranges from -2<sup>31</sup> to 2<sup>31</sup>-1, about +/-2 billion | ||
* unsigned k bit integer at most 2<sup>k</sup>-1 | * unsigned k bit integer at most 2<sup>k</sup>-1 |
Revision as of 20:20, 6 January 2020
Storage
- bit is 0 or 1, stands for “binary digit”
- byte is 8 bits, written for example like 1001 0101
- B - abbreviation for byte
- b - abbreviation for bit
- KB - kilobyte, 1000 bytes
- MB - megabyte, 1 million bytes
- GB - gigabyte, 1 billion bytes
- TB - terabyte, 1 trillion bytes
Base systems
- Able to convert between decimal, binary, hexadecimal, octal
- 15 = 1111 binary = F hex
- 255 = 1111 1111 binary = FF hex
- unsigned 8 bit integer ranges from 0 to 255
- signed 8 bit integer is between -128 and 127
- unsigned 32 bit integer ranges from 0 to 232-1, about 4 billion
- signed 32 bit integer ranges from -231 to 231-1, about +/-2 billion
- unsigned k bit integer at most 2k-1