8進制轉16進制
方法:
需透過2進制或10進制才能完成,常用2進制轉換較快速且直接。
應用的公式: 81 - - > 23 , 24 - - > 161
說明:8進制轉至2進制時是1位數轉成3位數,再轉至16進制時,
2進制須重新分段,以4位數轉成1位數。
2進制3位1組的權值是 4 2 1 ,
2進制4位1組的權值是 8 4 2 1 。
Ex:
73.5Q = 111 011 . 101B = 0011 1011 . 1010B = 3B.AH
| | | 7 | | | | 3 | | . | | | 5 | | Q |
= | | 1 | 1 | 1 | | 0 | 1 | 1 | . | | 1 | 0 | 1 | B |
| | 4 | 2 | 1 | | 4 | 2 | 1 | | | 4 | 2 | 1 | |
| | | | | | | | | | | | | | |
= | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | . | 1 | 0 | 1 | 0 | B |
| 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | | 8 | 4 | 2 | 1 | |
| | | | | | | | | | | | | | |
= | | | 3 | | | | B | | . | | | A | | H |
= | 3 | B | . | A | H | | | | | | | | | |
16進制轉8進制
方法:
需透過2進制或10進制才能完成,常用2進制轉換較快速且直接。
應用的公式: 161 - - > 24 , 23 - - > 81
說明:16進制轉至2進制時是1位數轉成4位數,再轉至8進制時,
2進制須重新分段,以3位數轉成1位數。
2進制3位1組的權值是 4 2 1 ,
2進制4位1組的權值是 8 4 2 1 。
Ex:
3B.AH = 0011 1011 . 1010B = 111 011 . 101B = 73.5Q
= | | | 3 | | | | B | | . | | | A | | H |
= | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | . | 1 | 0 | 1 | 0 | B |
| 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | | 8 | 4 | 2 | 1 | |
| | | | | | | | | | | | | | |
= | | 1 | 1 | 1 | | 0 | 1 | 1 | . | | 1 | 0 | 1 | B |
| | 4 | 2 | 1 | | 4 | 2 | 1 | | | 4 | 2 | 1 | |
| | | | | | | | | | | | | | |
= | | | 7 | | | | 3 | | . | | | 5 | | Q |
= | 7 | 3 | . | 5 | Q | | | | | | | | | |