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.

基数変換

Posted at

基数

基数...基本となる数。n進数のnにあたる数字

ex.二進数の場合
スクリーンショット 2021-02-20 22.14.58.png

以上のようになります。

基数変換(2進数から10進数)

2進数から10進数への変換方法は以下の通り
2021-02-20 22.33のイメージ.jpeg

この計算方法で計算を行います。
この計算結果は13.375となります。

・10進数から2進数

10進数から2進数へ変換する場合は下記の様になる。

スクリーンショット 2021-02-20 22.50.11.png

2進数から8進数・16進数##

・2→8進数
ex. 1101.010の場合

①3桁毎に区切る**(1 101. 010)**
②それぞれの区切り単位でそれぞれ10進数に変換。(基数の4 2 1)
③各桁の数字を合わせる(一桁目 1 2桁目5 小数点以下2)=15.2

・2→16進数

考え方は基本的に2→8進数と同じである。

①4桁ごとに区切る(1101.01)
②それぞれの区切り単位で10進数に変換(基数8 4 2 1)
③10進数を16進数に直す
④くっ付けて出来上がり

参考資料
キタミ式基本情報技術者
P 30〜P 39

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?