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 1 year has passed since last update.

2進数と8進数・16進数の基数変換

Last updated at Posted at 2022-06-27

8進数、16進数は2進数で一桁を表すとそれぞれ3桁、4桁になる。
それを利用して10真数に変換する。

例 1101.01を変換

8真数なので3桁ごとに分ける。なので
1と101と01に分ける。

8進数の場合

1は1
101は3桁目は4と1桁目は1なので5
010は2桁目は2
15.2になる。

16進数の場合

4桁ごとに分ける。なので
1101になる
4桁目は8
3桁目は4
1桁目は1 
13になるが16真数なのでDになる。

01になる。
3桁目が4
なので4になる。
これは16進数で表せるのでそのまま

D.4になる。

逆に2進数に変換する

15.2になる。
1は001
5は101
2は010

001101.010になる。

16進数の場合
D.4
1101.0100になる。
2つとも同じ結果になった。

気づき

たくさん訓練しないと簡単にはできないような感じがする。

出典 キタミ式イラストIT塾 基本情報技術者 令和03年

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?