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?

AP004_ビット数と扱える数値の関係

0
Last updated at Posted at 2025-08-31
  • データがnビットの場合、表せる数値は2^n通りである。
  • 符号なし整数の場合、表せる数値の範囲は0〜2^n
  • 符号つき整数の場合、表せる数値の範囲は-2^(n-1)〜2^(n-1)-1
  • 負の補数は、全ビットを反転させ、+1して求めることができる。
     8ビットの場合
    −1→11111111
    −5→00000101(5)→11111010→11111011
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?