进制转换二进制转八进制_将二进制数制转换为八进制数制

进制转换二进制转八进制

Prerequisite: Number systems

先决条件: 数字系统

To convert binary numbers into octal numbers, we first have to understand the relationship between binary and octal numbers.

要将二进制数转换为八进制数 ,我们首先必须了解二进制和八进制数之间的关系。

Octal NumberBinary Number
0000
1001
2010
3011
4100
5101
6110
7111
八进制数 二进制数
0 000
1个 001
2 010
3 011
4 100
5 101
6 110
7 111

In octal number system, we have eight digits ranging from 0 to 7 which can be represented using three-bit binary numbers in 23 = 8 ways, so starting from the least significant bit of the binary number, we group three successive bits of the binary number to get its equivalent octal number as seen from the table above.

在八进制系统中,我们有8个数字,范围从0到7 ,可以使用2 3 = 8方式使用三位二进制数表示,因此从二进制数的最低有效位开始,我们将二进制数的三个连续位分组从上表中可以看到二进制数以获得等效的八进制数。

In an integral part, the grouping of three bits is done from the right side to the left side whereas in the fractional part the grouping of three bits is done from left to right and then convert it to its equivalent octal symbol.

整数部分中 ,三个位的分组从右侧到左侧完成,而在分数部分中,三个位的分组从左侧到右侧完成,然后将其转换为等效的八进制符号。

In the process of grouping three bits, one or two bits can be added to the left of the MSB in an integral part and/or to the right of the LSB bit of the fractional part of the binary number.

在对三个位进行分组的过程中,可以将一位或两位添加到二进制数小数部分的整数部分的MSB左侧和/或LSB位的右侧。

Example 1: Convert (110011.011)2 to ( ? )8

示例1:将(110011.011) 2转换为(?) 8

Binary to Octal Example 1

Therefore, (110011.011)2 = (63.3)8

因此, (110011.011) 2 =(63.3) 8

Example 2: Convert (110011011110.1011)2 to ( ? )8

示例2:将(110011011110.1011) 2转换为(?) 8

Binary to Octal Example 2

Therefore, (110011011110.1011)2 = (14676.54)8

因此, (110011011110.1011) 2 =(14676.54) 8

Note: In the Example 2, to make a group of three bits, we have added two additional bits to the left of MSB in an integral part and two additional bits to the right of LSB in the fractional part.

注意:在示例2中,要组成一组三位,我们在整数部分的MSB左侧添加了两个附加位,在小数部分的LSB右侧添加了两个附加位。

翻译自: https://www.includehelp.com/basics/conversion-of-binary-number-system-into-octal-number-system.aspx

进制转换二进制转八进制

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值