-2

While converting the fractional part of a decimal number to another number system, why do we write the integer part from top to bottom and not the other way?

enter image description here

Since the fractional part is 0, the multiplication is stopped. Writing the integer part from top to bottom to get binary number for the fractional part. Therefore, (0.25)10 = (0.01)2

Anshul Gupta
  • 385
  • 3
  • 12
  • 2
    You really should show what you are talking about. I am writing it from left to right. Better yet, ask your instructor who probably showed you this method. – Eugene Sh. Jun 01 '21 at 13:42
  • 1
    This doesn't appear to be an electronics question. – Transistor Jun 01 '21 at 13:42
  • @Transistor This is a digital circuits question. – Anshul Gupta Jun 02 '21 at 16:36
  • You don't have to do this, you can use any representation of binary to represent any number. Some conventions for fractional numbers are backwards with the MSB and LSB reversed. You just have to keep track of your convention. – Voltage Spike Jun 02 '21 at 16:47
  • @VoltageSpike I am sorry. I did not get you. Can you please elaborate. Besides I think that you haven't understood the question. My question is " why do we write the integer part from top to bottom and not the other way?" – Anshul Gupta Jun 02 '21 at 16:49
  • Your conclusion is wrong. 0.1010110 is not 0.675, it's 0.671875. – asdfex Jun 02 '21 at 17:00
  • @asdfex You are write but it is not possible to represent 0.675 in binary so I calculated to only limited numbers after decimal point. Since computers also have limited space. Perhaps you haven't read my question completely. – Anshul Gupta Jun 02 '21 at 17:05
  • Perhaps you should write more carefully. You wrote "\$(0.675)_{10} = (0.1010110)_2\$" which is not correct. You should use \$\approx\$ instead so that your meaning is clear. – Elliot Alderson Jun 02 '21 at 17:18
  • @ElliotAlderson Ok. Now I have corrected it. – Anshul Gupta Jun 02 '21 at 17:24

1 Answers1

1

Each step doubles the remainder. The farther down the list, the more times the remainders have been doubled before they reach 1. The more times a bit has been doubled, the less significant it is. The convention for writing numbers is to order the digits (bits) with the most significant first. The integer part for the first step is doubled fewer times than all the rest, so we write it first.

When we refer to numbers stored in a computer, it is helpful to identify the locations. The hardware enforces addresses for bytes (or words, depending on the architecture). But for bits-within-byte we have only convention. Do we number them 1 to 8, or 0 to 7? Is number 0 the one on the left (most significant bit, MSB) or the one on the right (LSB)? It can depend on the manufacturer, assembler writer, cultural convention, or articles of personal faith.

BTW, the same base conversion works for bases besides 2. You multiply by the base each time instead of 2. It even works for irrational bases, like pi-nary or e-nary!

r-bryan
  • 111
  • 4