转换器工具

0 characters

Enter an octal number (0-7). The '0o' prefix is optional. Choose between unsigned and signed (two's complement) interpretation.

Bits:

0

Type:

Unsigned

二进制表示:

十六进制表示:

关于数字系统

八进制系统

The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right).

八进制到十进制转换表

Octal Decimal Octal Decimal
0 0 4 4
1 1 5 5
2 2 6 6
3 3 7 7

十进制系统

十进制系统是一种以 10 为基数的编号系统,它使用十个不同的符号:0、1、2、3、4、5、6、7、8 和 9。它是 中最常用的数字系统日常生活。

2 的补码

2 的完成NT 是一种数学运算,用于在二进制系统中表示负数。它被广泛用于计算,因为它简化了加法和减法等算术运算。

要在 2 的补码中将正数转换为负数:

  1. 将数字转换为二进制。
  2. Invert all the bits (change 0 to 1 and 1 to 0).
  3. 将 1 添加到反转的结果中。

要将负 2 的补码数转换回十进制:

  1. 反转所有位。
  2. 将 1 添加到反转的结果中。
  3. 将结果转换为 decimal 并在其前面加上负号。

示例:8 位 2 的补码

Positive Number (5):

0000 0101 (binary)

Negative Number (-5):

1111 1010 (inverted bits of 5)

1111 1011 (add 1 = two's complement representation of -5)

范围 对于 8 位 2 补码:

-128 (1000 0000) to 127 (0111 1111)

Related Tools