0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【基本情報技術者】16進数を10進数に変換

Last updated at Posted at 2021-02-06

16進数289,fffを10進数に変換

【解説】
16進数289,fffを10進数に変換する方法を説明したいと思います。

考え方として、
1桁目はそのまま
2桁目は16 * 値
3桁目は16 * 16 * 値
1桁目 + 2桁目 + 3桁目 = 10進数の値 となります。

この場合であれば、
1桁目の9はそのまま
2桁目は 16 * 8 = 128
3桁目は 16 * 16 * 2 = 512
9 + 128 + 512 = 649 が10進数の値となります.

fffの場合であれば、
15
16 * 15 = 240
16 * 16 * 15 = 3840
15 + 240 + 3840 = 4095 が10進数の値です.

ここで注意なのが16進数は0から始まっているため、
fに対応する10進数の値は15となります.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?