Microcomputer Systems:Converting Binary Numbers into Octal and Negative Numbers

Converting Binary Numbers into Octal

To convert a binary number into octal, arrange the number in groups of three and write the octal equivalent of each digit.

Microcomputer Systems-0020

Negative Numbers

The most significant bit of a binary number is usually used as the sign bit. By convention, for positive numbers this bit is 0, and for negative numbers this bit is 1. Figure 1.5 shows the 4-bit positive and negative numbers. The largest positive and negative numbers are þ7 and -8 respectively.

Microcomputer Systems-0021

To convert a positive number to negative, take the complement of the number and add 1. This process is also called the 2’s complement of the number.

Microcomputer Systems-0022

Leave a comment

Your email address will not be published. Required fields are marked *