Least significant bit when there is a radix point (trivial)

  • Context: Comp Sci 
  • Thread starter Thread starter JC2000
  • Start date Start date
  • Tags Tags
    Bit Point
Click For Summary
SUMMARY

The discussion centers on the correct method for grouping binary digits when converting a binary number with a radix point to an octal number. The consensus is that for the integral part, grouping should start from the least significant bit (rightmost) and proceed left, while for the fractional part, grouping should start from the leftmost bit and proceed right, adding zeros as necessary. The example provided, (110101010.1011010), converts to octal as 652.5508. Additionally, the discussion touches on converting binary floating-point numbers to hexadecimal using a similar grouping method.

PREREQUISITES
  • Understanding of binary number representation
  • Knowledge of octal and hexadecimal number systems
  • Familiarity with the IEEE-754 standard for floating point representation
  • Basic skills in binary arithmetic and conversions
NEXT STEPS
  • Study binary to octal conversion techniques
  • Learn about binary to hexadecimal conversion methods
  • Explore the IEEE-754 standard for floating point representation
  • Practice grouping binary digits for various number systems
USEFUL FOR

Students, educators, and professionals in computer science, particularly those focusing on number systems, binary arithmetic, and data representation in computing.

JC2000
Messages
186
Reaction score
16
Homework Statement
Convert ( 110101010.1011010) from binary to octal number system
Relevant Equations
When converting a binary number to an octal number I know that the binary digits must be grouped in sets of three. The grouping must begin from the least significant bit and additional zero's can be added beyond the most significant bit to ensure that all groups are a set of three.
However when there is a binary point where do I start grouping from? Is the rightmost bit considered the least significant bit even then?

The other possibility is to begin grouping from the least significant bit for the integral part and then separately begin grouping from the leftmost digit of the fractional part (adding a zero beyond the rightmost digit in case grouping is not even).

Which method is correct?
 
Physics news on Phys.org
JC2000 said:
Homework Statement:: Convert ( 110101010.1011010) from binary to octal number system
Relevant Equations:: When converting a binary number to an octal number I know that the binary digits must be grouped in sets of three. The grouping must begin from the least significant bit and additional zero's can be added beyond the most significant bit to ensure that all groups are a set of three.

However when there is a binary point where do I start grouping from? Is the rightmost bit considered the least significant bit even then?
Yes.
For the integer part, left of the binary point, group the bits in groups of 3, from right to left. To the right of the binary point, group the bits in groups of three, from left to right, and tack on 0 bits at the right end, as necessary. You can tack on extra 0 bits at the left end, but this doesn't seem necessary.
From your example, 110 101 010.101 101 000. (two zero bits added at right end)
In octal, this would be 652.5508, although you could omit that final 0 digit.
JC2000 said:
The other possibility is to begin grouping from the least significant bit for the integral part and then separately begin grouping from the leftmost digit of the fractional part (adding a zero beyond the rightmost digit in case grouping is not even).

Which method is correct?
No, you don't want to do this. You want groups of three bits extending from the binary point in both directions.

Note that you could convert a floating point number in binary to hexadecimal using a technique that's almost the same. The only difference would be getting groups of four bits extending left and right from the binary point.
Doing this with your example would be done this way:
1 1010 1010.1011 0100, which is 1AA.B416, or 0x1AA.B4, using the 0x prefix that is the usual convention for numbers in hex. It's worth noting, though, that floating points numbers are almost never represented this way; i.e., with a "hex point." What is normally used is a representation that follows the IEEE-754 standard for floating point numbers (https://en.wikipedia.org/wiki/IEEE_754).
 
Last edited:
  • Like
Likes   Reactions: JC2000
A way to remember/understand is to realize that each bit represents a power of 2, starting from the radix point (just like powers of 10 around the decimal point in our decimal system).

Using just the 5 bits around the radix point in your example would be:
10.101
Code:
   0   .   1      0      1
(1×21) + (0×20) . + (1×2-1) + (0×2-2) + (1×2-3)

Cheers,
Tom
 
  • Like
Likes   Reactions: JC2000

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
14K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
6
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
17
Views
6K
  • · Replies 15 ·
Replies
15
Views
6K