2、8、16 進制間的關係
公式:23=81
說明:2進制的3位數,可組成8進制的1位數。
3 bit 的2進位數 可表示的數值大小範圍是0~7,剛好是8進制數1位數的有效數字範圍,故可用2進制的3位數,組成8進制的1位數。
Ex:
| 2 | 進 | 制 | | | | | |
| A | B | C | | ß | 變 | 數 | |
| 22 | 21 | 20 | | | | | |
| 4 | 2 | 1 | | ß | 權 | 值 | |
| 0 | 0 | 0 | = | 0 | | | |
| 0 | 0 | 1 | = | 1 | | | |
| 0 | 1 | 0 | = | 2 | | | |
| 0 | 1 | 1 | = | 3 | | | |
| 1 | 0 | 0 | = | 4 | | | |
| 1 | 0 | 1 | = | 5 | | | |
| 1 | 1 | 0 | = | 6 | | | |
| 1 | 1 | 1 | = | 7 | | | |
公式:24=161
說明:2進制的4位數,可組成16進制的1位數。
4 bit 的2進位數 可表示的數值大小範圍是0~15,剛好是16進制數1位數的有效數字範圍,故可用2進制的4位數,組成16進制的1位數。
Ex:
| 2 | 進 | 制 | | | | |
A | B | C | D | | | | |
23 | 22 | 21 | 20 | | | | |
8 | 4 | 2 | 1 | | | | |
0 | 0 | 0 | 0 | = | 0 | | |
0 | 0 | 0 | 1 | = | 1 | | |
0 | 0 | 1 | 0 | = | 2 | | |
0 | 0 | 1 | 1 | = | 3 | | |
0 | 1 | 0 | 0 | = | 4 | | |
0 | 1 | 0 | 1 | = | 5 | | |
0 | 1 | 1 | 0 | = | 6 | | |
0 | 1 | 1 | 1 | = | 7 | | |
1 | 0 | 0 | 0 | = | 8 | | |
1 | 0 | 0 | 1 | = | 9 | | |
1 | 0 | 1 | 0 | = | 10 | = | A |
1 | 0 | 1 | 1 | = | 11 | = | B |
1 | 1 | 0 | 0 | = | 12 | = | C |
1 | 1 | 0 | 1 | = | 13 | = | D |
1 | 1 | 1 | 0 | = | 14 | = | E |
1 | 1 | 1 | 1 | = | 15 | = | F |
| | | | | | | |