[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 724
  • Last Modified:

Convert from Binary to Hexadecimal

How can I convert this to hexadecimal:

11101.0110000000
0
pauledwardian
Asked:
pauledwardian
  • 4
  • 3
  • 3
  • +3
3 Solutions
 
ozoCommented:
1 1101 . 0110 0000 00
1    d .    6    0

Open in new window

0
 
pauledwardianAuthor Commented:
One more question:
How can I convert AC.F3???
I know the AC which would be 172 BUT I am confused about the .F3 The dot gets me confused!!!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ozoCommented:
In binary, it would be
1010 1100 . 1111 0011
in decimal, it would be
172.94921875
0
 
lpautasCommented:
In binary mode the     ". "  is not admitted.
What . mean for you in this context?
Where this binary number come from?
0
 
lpautasCommented:
Also in hex mode "." is not admitted.
Correct is 0ACF3H used in ASSEMBLY programming
Correct is 0xACF3 used in C programming

AC.F3 is invalid type and all compiler get error
0
 
TommySzalapskiCommented:
lpautas, I don't think he's using the same assembler you are. I think it's more of an academic question so binary and hex are just base 2 and base 16 here. There's no reason they can't have decimal points (or whatever you would call them).

pauledwardian, if you are converting from hex to binary, just leave the dot where it is and convert the digits one at a time.
If you are going from binary to hex, then start at the point and group the digits into fours (pad with 0s when needed). Then convert.

Example 101101.01111
Put in groups of 4 from the point 10 1101 . 0111  1
Pad with 0s (if it helps) 0010  1101 . 0111  1000
Convert using the below table (or whatever) 2D.78

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
0
 
awking00Commented:
>>In binary, it would be
1010 1100 . 1111 0011
in decimal, it would be
172.94921875 <<
ozo,
Can you explain how this conclusion was reached? I've never dealt with base numbers other than 10 that contained decimal points.
0
 
awking00Commented:
I see how the 172 is derived, it's the part after the decimal I don't understand.
0
 
TommySzalapskiCommented:
It's just like decimal.
Take the number abc.xyz
In decimal
a is hundreds place (10^2)
b is tens place (10^1)
c is ones place (10^0)
x is tenths place (10^-1)
y is hundredths place (10^-2)
z is thousandths place (10^-3)

In binary
a is fours place (2^2)
b is twos place (2^1)
c is ones place (2^0)
x is halves place (2^-1)
y is quarters place (2^-2)
z is eighths place (2^-3)
0
 
TommySzalapskiCommented:
So . 11110011 is 1*1/2 + 1*1/4 + 1*1/8 + 1*1/16 + 0*1/32 + 0*1/64 + 1*1/128 + 1*1/256
0
 
awking00Commented:
Thank you for that explanation. Now it makes a lot of sense.
0
 
pauledwardianAuthor Commented:
then how does AC.F3 converts to 172.94921875 in decimal!!!
0
 
TommySzalapskiCommented:
Same thing. The F is in the 16ths place and the 3 is in the 256ths place
So 15/16 + 3/256 = .94921875
0
 
pauledwardianAuthor Commented:
Thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now