How to convert octal 421 to nibble, byte, word and long word

  • Topic:
  • Thread starter Thread starter bergausstein
  • Start date Start date
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
7 replies · 3K views
bergausstein
Messages
191
Reaction score
0
We are asked to convert the octal number 421(base 8) to nibble, byte, word and long word. Please help me how to go about it. I know that a nibble is half-byte wihich has 4 bits in it. But to cconvert an octal number to nibble is something I don't know how to do please help me. Thanks.
 
Physics news on Phys.org
How many bits does it take to store each digit of an octal number?
 
bergausstein said:
Hi markfl! digits in octal take 3 bits.

Correct, since each octal digit can take one of 8 values (0-7) and $8=2^3$. So, a 3 digit octal number will require 9 bits, which means how many nibbles will be required?
 
MarkFL said:
Correct, since each octal digit can take one of 8 values (0-7) and $8=2^3$. So, a 3 digit octal number will require 9 bits, which means how many nibbles will be required?

It will take 2 nibbles a 1 bit?

So, 4 = 100, 2 = 010 , 1 = 001. In binary, 100010001.

In nibbles, 1 0001 0001. Is this correct?
 
bergausstein said:
It will take 2 nibbles a 1 bit?

So, 4 = 100, 2 = 010 , 1 = 001. In binary, 100010001.

In nibbles, 1 0001 0001. Is this correct?

I am assuming we cannot have "partial nibbles" so we would need $$\left\lceil\frac{9}{4}\right\rceil=3$$ nibbles:

0001 0001 0001

How about the other data types?
 
MarkFL said:
I am assuming we cannot have "partial nibbles" so we would need $$\left\lceil\frac{9}{4}\right\rceil=3$$ nibbles:

0001 0001 0001

How about the other data types?

In bytes 00000001 00010001


In word 0000000100010001

In long word 00000000000000000000000100010001

Are my answers correct?
 
bergausstein said:
In bytes 00000001 00010001


In word 0000000100010001

In long word 00000000000000000000000100010001

Are my answers correct?

Yes, I agree with your answers. (Yes)