Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-07-05 00:22:46

jackie83sg
Member
Registered: 2007-07-05
Posts: 1

Help Hex to Dec Conversion

I heard some people on the web says that 11 00 HEX can be 1 DEC.

My program read from right to left which is 00 11 HEX after reading is 17 Dec.

So is there any mathematic conversion that without reading right to left, it can be 11 00 HEX to be 1 DEC?

HELP ME!

Offline

#2 2007-07-05 01:36:22

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Help Hex to Dec Conversion

Those people are wrong.  1100 is either 16*1 + 1, or it's 16^3*1 + 16^2*1

In general, to convert a base b to decimal, where the digits are "acdefg"

But as you said, it does matter which way the digits are read.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#3 2007-07-05 05:21:04

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Help Hex to Dec Conversion

In Hex, 11 is 17 because 1(16)+1(1) is 16 + 1 is 17.

Now in binary, which is similar to hex, four digits is one digit.
In binary 1100 is 12 because 1(8)+1(4)+0(2)+0(1), 8 + 4 = 12, the 2 and the 1 are zeros.
Now 1001 is 9 in binary and 10001 is 17.

But in Hex, the number C2 is 12(16)+2(1), where C is 12 because A is 10 and 11 is B.
So 12 times 16 plus 2 is 192 + 2 or 194.  So C2 is 194.

Also in Hex, FF is 255 in decimal because F means 15 and 15(16)+15(1) is probably 255.
Let's see 15 times 16 is 225 plus 15 more or 240.  And 15 more is 255.
225 is 15 times 15.
240 is 16 times 15.
255 is 17 times 15.


igloo myrtilles fourmis

Offline

Board footer

Powered by FluxBB