Rebooting
Rebooting

Reputation: 2938

hexadecimal to binary conversion

I have a question:

1A45 (Hexadecimal) GB= _____ (Binary) Bytes

Please tell how to fill in the answer!

Doing the calculation the conventional way, it takes a lot of time and i am not able to get the answer ...

Upvotes: 2

Views: 3166

Answers (3)

Sergey Kalinichenko
Sergey Kalinichenko

Reputation: 726569

Hex-Bin conversion is easy, because each hex digit is four bit long. Memorize this table, and you'll be able to do conversion in your head very easily:

0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Just replace each hex digit with its corresponding four bits, and you'll get the first part of your answer.

Now for the GB: K means 10 binary zeros, M means 20 binary zeros, G means 30 binary zeros. Add zeros to the end of your HEX-converted-to-BIN number to get your final answer.

Upvotes: 4

mgibsonbr
mgibsonbr

Reputation: 22007

Well, there are two problems here:

  1. Convert 1A45 from hex to binary (is it really binary you want?)

  2. Multiply it for 10^9 or 2^30, depending on what definition of GB you're using.

The first is already answered by GoldenNewby, the second will depend on your needs.

Upvotes: 1

GoldenNewby
GoldenNewby

Reputation: 4452

1A45 can be expressed in two 8 bit bytes as 00011010 01000101, the decimal value is 6725

Upvotes: 1

Related Questions