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?

bit,進数

Last updated at Posted at 2025-02-08

bit

最小の単位
2進数1桁
0と1

進数

よく使われるn進数…2進数、8進数、16進数
n進数のnとは…つかえる数字の数。収まらない時は桁が上がる

◯2進数

0,1,10,11,100,101,110,111,1000 

111→1000の解説
増えるのは必ず1桁目から。
111の1桁目が繰り上がって、0
そうすると2桁目も繰り上がって0
3桁目同じように繰り上がって0
4桁目に1がくる

◯8進数

0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,20,21,〜76,77,100
7の次がないので桁あがり

◯16進数

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12,13,〜19,
1A,1B,〜1E,1F,20,21,22,〜F1,F2,〜FE,FF,100
Fの次がないので桁あがり

FF→100の解説
1桁目が繰り上がることで、2桁目も加算されて繰り上がって3桁になる

<各桁の重み>

  • 小数点より前
重み 10進数 2進数 8進数 16進数
1桁目  $n^0$ 1 1 1 1
2桁目  $n^1$ 10 2 8 16
3桁目  $n^2$ 100 4 64 16
4桁目  $n^3$ 1000 8 512 256
N桁目  $n^{N-1}$
  • 小数点より後ろ
重み 10進数 2進数 8進数 16進数
1桁目  $n^{-1}$ 1/10 1/2 1/8 1/16
2桁目  $n^{-2}$ 1/100 1/4 1/64 1/512
3桁目  $n^{-3}$ 1/1000 1/8 1/512 1/4096
N桁目  $n^{-N}$

☆ -乗については別で解説

0
0
1

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?