LoginSignup
41
36

More than 5 years have passed since last update.

2進数10進数16進数

Last updated at Posted at 2014-09-25

対応表

10進数 16進数 2進数
0 0x0 0000
1 0x1 0001
2 0x2 0010
3 0x3 0011
4 0x4 0100
5 0x5 0101
6 0x6 0110
7 0x7 0111
8 0x8 1000
9 0x9 1001
10 0xA 1010
11 0xB 1011
12 0xC 1100
13 0xD 1101
14 0xE 1110
15 0xF 1111

下位ビットの取り出し

ビット数 16進マスク 2進マスク
1 0x01 0000 0001
2 0x03 0000 0011
3 0x07 0000 0111
4 0x0F 0000 1111
5 0x1F 0001 1111
6 0x3F 0011 1111
7 0x7F 0111 1111
8 0xFF 1111 1111

各ビット単体

2進数 16進数
1000 0000 0x80
0100 0000 0x40
0010 0000 0x20
0001 0000 0x10
0000 1000 0x08
0000 0100 0x04
0000 0010 0x02
0000 0001 0x01
41
36
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
41
36