Home > Archive > alt.certification.a-plus > June 2003 > Converting Binary to Hexadecimal





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Converting Binary to Hexadecimal
Easynews

2003-06-15, 11:23 am

Brain, in order to convert binary in hex you need to divide a binary
number into 4 bit chucks; 101001010110--->1010-0101-0110 (the dash between
the bits are there just as a visual aid for separating the 4 bit chucks).
A binary bit represents two states, either on or off which is represented
by 1 or 0. The decimal or whole number value of binary number is based on
the bit's position relative to the others. The numbers increase from left to
right by a power of 2. The number increases by a power of two because you
have to two possible values for one bit, 1 or 0. The whole number values for
a 1 byte with all the bits is ON(1 byte is a 8 bit number) from right to
left are:
256 128 64 32 16 8 4 2 1
2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

The second line of the chart is simply the expontial math that produces the
numbers. Btw, 2^0 = 1 trust me on this one

So let's take the first chuck of our above example; 0110. We start on the
rightmost bit and start taking note of which bits are ON or have ones. We
see that the 2nd and 3rd digits have ones. When we note what is their
relative positions within the 4 bit number. We see that they take up the
2nd and 3rd positions. Now if you take a look at the chart we created above,
you see that the 2nd bit has a whole number value of 2 and the 3rd bit a
vulue of 4. Now all we have to do is add all these values and we get our
whole number value for the 4 bit number, which is 0+4+2+0 = 6. The other
values for the final two chunks are 0101 = 0+4+0+1 = 5 and 1010 = 8+0+4+0 =
12. Now we add all three chucks to get a grand total of: 12+5+6 = 23

Now to conver binary into hexidecimal, we proceed the same way we did
previously by separating the bits in 4 bit chucks and converting to whole
number. Taking our above example 12+5+6,
any number less or equal to nine remains untouched. Any number greater than
9 is assigned a letter starting with A so:
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15

So the hexidecmal number for would be C56. When doing this convertion, make
sure you keep the order of the bits as the original or you'll wind up with a
wrong hex number.

I know this is a more involed method than Ralph's excellent chart but I
thought I'd post this in the hopes that you can see how and why Ralph's
chart "works".








"Brian" <BAWolff@shaw.ca> wrote in message
news:mcDua.141067$ja.5352189@news2.calgary.shaw.ca...
> thanks for the chart. Really cool
>
> P.s. I'll still try to learn convertin bin to hex but good for the

meantime


Kenny

2003-06-15, 1:23 pm

Much quicker way, change the view in Windows calculator to scientific and it
will do the conversion for you.

--

Kenny


"Easynews" <none@none.com> wrote in message
news:7w0Ha.1216897$vw6.9064165@news.easynews.com...
> Brain, in order to convert binary in hex you need to divide a binary
> number into 4 bit chucks; 101001010110--->1010-0101-0110 (the dash between
> the bits are there just as a visual aid for separating the 4 bit chucks).
> A binary bit represents two states, either on or off which is

represented
> by 1 or 0. The decimal or whole number value of binary number is based on
> the bit's position relative to the others. The numbers increase from left

to
> right by a power of 2. The number increases by a power of two because you
> have to two possible values for one bit, 1 or 0. The whole number values

for
> a 1 byte with all the bits is ON(1 byte is a 8 bit number) from right to
> left are:
> 256 128 64 32 16 8 4 2 1
> 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
>
> The second line of the chart is simply the expontial math that produces

the
> numbers. Btw, 2^0 = 1 trust me on this one
>
> So let's take the first chuck of our above example; 0110. We start on

the
> rightmost bit and start taking note of which bits are ON or have ones. We
> see that the 2nd and 3rd digits have ones. When we note what is their
> relative positions within the 4 bit number. We see that they take up the
> 2nd and 3rd positions. Now if you take a look at the chart we created

above,
> you see that the 2nd bit has a whole number value of 2 and the 3rd bit a
> vulue of 4. Now all we have to do is add all these values and we get our
> whole number value for the 4 bit number, which is 0+4+2+0 = 6. The other
> values for the final two chunks are 0101 = 0+4+0+1 = 5 and 1010 = 8+0+4+0

=
> 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23
>
> Now to conver binary into hexidecimal, we proceed the same way we did
> previously by separating the bits in 4 bit chucks and converting to whole
> number. Taking our above example 12+5+6,
> any number less or equal to nine remains untouched. Any number greater

than
> 9 is assigned a letter starting with A so:
> A = 10
> B = 11
> C = 12
> D = 13
> E = 14
> F = 15
>
> So the hexidecmal number for would be C56. When doing this convertion,

make
> sure you keep the order of the bits as the original or you'll wind up with

a
> wrong hex number.
>
> I know this is a more involed method than Ralph's excellent chart but I
> thought I'd post this in the hopes that you can see how and why Ralph's
> chart "works".
>
>
>
>
>
>
>
>
> "Brian" <BAWolff@shaw.ca> wrote in message
> news:mcDua.141067$ja.5352189@news2.calgary.shaw.ca...
> > thanks for the chart. Really cool
> >
> > P.s. I'll still try to learn convertin bin to hex but good for the

> meantime
>
>



Easynews

2003-06-15, 7:23 pm

Like I stated in the original post, my intention was to show you how
hexidecimal/binary conversions are derived. It was a teaching excercise.You
won't need a calculator if you understand the calculation behind the
conversion. On another note, I doubt very much that you will be able to take
a notebook computer with you on the A+ exam
"Kenny" <elvis@gracelands.com> wrote in message
news:bcicdv$j680u$1@ID-126822.news.dfncis.de...
> Much quicker way, change the view in Windows calculator to scientific and

it
> will do the conversion for you.
>
> --
>
> Kenny
>
>
> "Easynews" <none@none.com> wrote in message
> news:7w0Ha.1216897$vw6.9064165@news.easynews.com...
> > Brain, in order to convert binary in hex you need to divide a binary
> > number into 4 bit chucks; 101001010110--->1010-0101-0110 (the dash

between
> > the bits are there just as a visual aid for separating the 4 bit

chucks).
> > A binary bit represents two states, either on or off which is

> represented
> > by 1 or 0. The decimal or whole number value of binary number is based

on
> > the bit's position relative to the others. The numbers increase from

left
> to
> > right by a power of 2. The number increases by a power of two because

you
> > have to two possible values for one bit, 1 or 0. The whole number values

> for
> > a 1 byte with all the bits is ON(1 byte is a 8 bit number) from right to
> > left are:
> > 256 128 64 32 16 8 4 2

1
> > 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
> >
> > The second line of the chart is simply the expontial math that produces

> the
> > numbers. Btw, 2^0 = 1 trust me on this one
> >
> > So let's take the first chuck of our above example; 0110. We start on

> the
> > rightmost bit and start taking note of which bits are ON or have ones.

We
> > see that the 2nd and 3rd digits have ones. When we note what is their
> > relative positions within the 4 bit number. We see that they take up

the
> > 2nd and 3rd positions. Now if you take a look at the chart we created

> above,
> > you see that the 2nd bit has a whole number value of 2 and the 3rd bit a
> > vulue of 4. Now all we have to do is add all these values and we get our
> > whole number value for the 4 bit number, which is 0+4+2+0 = 6. The other
> > values for the final two chunks are 0101 = 0+4+0+1 = 5 and 1010 =

8+0+4+0
> =
> > 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23
> >
> > Now to conver binary into hexidecimal, we proceed the same way we did
> > previously by separating the bits in 4 bit chucks and converting to

whole

> > number. Taking our above example 12+5+6,
> > any number less or equal to nine remains untouched. Any number greater

> than
> > 9 is assigned a letter starting with A so:
> > A = 10
> > B = 11
> > C = 12
> > D = 13
> > E = 14
> > F = 15
> >
> > So the hexidecmal number for would be C56. When doing this convertion,

> make
> > sure you keep the order of the bits as the original or you'll wind up

with
> a
> > wrong hex number.
> >
> > I know this is a more involed method than Ralph's excellent chart but

I
> > thought I'd post this in the hopes that you can see how and why Ralph's
> > chart "works".
> >
> >
> >
> >
> >
> >
> >
> >
> > "Brian" <BAWolff@shaw.ca> wrote in message
> > news:mcDua.141067$ja.5352189@news2.calgary.shaw.ca...
> > > thanks for the chart. Really cool
> > >
> > > P.s. I'll still try to learn convertin bin to hex but good for the

> > meantime
> >
> >

>
>



Easynews

2003-06-15, 8:23 pm

Made an error, increase by a power of 2 from right to left, not left to
right! Sorry
"Easynews" <none@none.com> wrote in message
news:0q7Ha.2051623$YZ.325388@news.easynews.com...
> Like I stated in the original post, my intention was to show you how
> hexidecimal/binary conversions are derived. It was a teaching

excercise.You
> won't need a calculator if you understand the calculation behind the
> conversion. On another note, I doubt very much that you will be able to

take
> a notebook computer with you on the A+ exam
> "Kenny" <elvis@gracelands.com> wrote in message
> news:bcicdv$j680u$1@ID-126822.news.dfncis.de...
> > Much quicker way, change the view in Windows calculator to scientific

and
> it
> > will do the conversion for you.
> >
> > --
> >
> > Kenny
> >
> >
> > "Easynews" <none@none.com> wrote in message
> > news:7w0Ha.1216897$vw6.9064165@news.easynews.com...
> > > Brain, in order to convert binary in hex you need to divide a binary
> > > number into 4 bit chucks; 101001010110--->1010-0101-0110 (the dash

> between
> > > the bits are there just as a visual aid for separating the 4 bit

> chucks).
> > > A binary bit represents two states, either on or off which is

> > represented
> > > by 1 or 0. The decimal or whole number value of binary number is based

> on

> > > the bit's position relative to the others. The numbers increase from

> left
> > to
> > > right by a power of 2. The number increases by a power of two because

> you
> > > have to two possible values for one bit, 1 or 0. The whole number

values
> > for
> > > a 1 byte with all the bits is ON(1 byte is a 8 bit number) from right

to[co
lor=darkred]
> > > left are:
> > > 256 128 64 32 16 8 4 2

> 1
> > > 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
> > >
> > > The second line of the chart is simply the expontial math that
[/color]
produces
> > the
> > > numbers. Btw, 2^0 = 1 trust me on this one
> > >
> > > So let's take the first chuck of our above example; 0110. We start

on
> > the
> > > rightmost bit and start taking note of which bits are ON or have ones.

> We

> > > see that the 2nd and 3rd digits have ones. When we note what is their
> > > relative positions within the 4 bit number. We see that they take up

> the
> > > 2nd and 3rd positions. Now if you take a look at the chart we created

> > above,
> > > you see that the 2nd bit has a whole number value of 2 and the 3rd bit

a[col
or=darkred]
> > > vulue of 4. Now all we have to do is add all these values and we get
[/color]
our[c
olor=darkred]
> > > whole number value for the 4 bit number, which is 0+4+2+0 = 6. The
[/color]
other

> > > values for the final two chunks are 0101 = 0+4+0+1 = 5 and 1010 =

> 8+0+4+0
> > =
> > > 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23
> > >
> > > Now to conver binary into hexidecimal, we proceed the same way we

did[c
olor=darkred]
> > > previously by separating the bits in 4 bit chucks and converting to

> whole
> > > number. Taking our above example 12+5+6,
> > > any number less or equal to nine remains untouched. Any number greater

> > than
> > > 9 is assigned a letter starting with A so:
> > > A = 10
> > > B = 11
> > > C = 12
> > > D = 13
> > > E = 14
> > > F = 15
> > >
> > > So the hexidecmal number for would be C56. When doing this
[/color]
convertion,
> > make
> > > sure you keep the order of the bits as the original or you'll wind up

> with
> > a
> > > wrong hex number.
> > >
> > > I know this is a more involed method than Ralph's excellent chart

but
> I
> > > thought I'd post this in the hopes that you can see how and why

Ralph's
> > > chart "works".
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Brian" <BAWolff@shaw.ca> wrote in message
> > > news:mcDua.141067$ja.5352189@news2.calgary.shaw.ca...
> > > > thanks for the chart. Really cool
> > > >
> > > > P.s. I'll still try to learn convertin bin to hex but good for the
> > > meantime
> > >
> > >

> >
> >

>
>



JK_Deth

2003-06-15, 9:23 pm

Two points:

1. Although its interesting to learn, you don't need this for the A+

2. Your 'system' is wrong. Your answers are incorrect. The methods you
outline will always give an incorrect answer.

Check in line to see where flubbed it on the math. But on the whole the post
was confusing and a poor example as a 'teaching exercise'.


You begin by stating your converting bin to hex.
[colo
r=darkred]
> > > Brain, in order to convert binary in hex you need to divide a binary
> > > number into 4 bit chucks; 101001010110--->1010-0101-0110 (the dash

> between
> > > the bits are there just as a visual aid for separating the 4 bit

> chucks).[/color]

You did okay so far sperating into 4 bit groups part works converting bin to
hex. Using your example above you get this:

1010 - A
0101 - 5
0110 - 6
[colo
r=darkred]
> > > A binary bit represents
[/color]

All that info was unneccesary really, someone learning conversion should
first learn the systems.
[colo
r=darkred]
> > > 256 128 64 32 16 8 4 2

> 1
> > > 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
> > >
[/color]
[colo
r=darkred]
> > > So let's take the first chuck of our above example; 0110. We start
[/color]
on
> > the
> > > rightmost bit and start taking note of which bits are ON or have ones.

> We

> > > see that the 2nd and 3rd digits have ones. When we note what is their
> > > relative positions within the 4 bit number. We see that they take up

> the
> > > 2nd and 3rd positions. Now if you take a look at the chart we created

> > above,
> > > you see that the 2nd bit has a whole number value of 2 and the 3rd bit

a[col
or=darkred]
> > > vulue of 4. Now all we have to do is add all these values and we get
[/color]
our[c
olor=darkred]
> > > whole number value for the 4 bit number, which is 0+4+2+0 = 6. The
[/color]
other

> > > values for the final two chunks are 0101 = 0+4+0+1 = 5 and 1010 =

> 8+0+4+0


First math error 1010 would be 8+0+2+0 or 10


> > =
> > > 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23
> > >


There was really no poimt in adding all three chunks, the 23 is arrived at
erroneously and has no meaning.
(The decimal value of the binary number you began with is 2646)
[colo
r=darkred]
> > > Now to conver binary into hexidecimal, we proceed the same way we
[/color]
did

I thought that was what we were doing already?
[colo
r=darkred]
> > > previously by separating the bits in 4 bit chucks and converting to

> whole
> > > number. Taking our above example 12+5+6,
> > > any number less or equal to nine remains untouched. Any number greater

> > than
> > > 9 is assigned a letter starting with A so:
> > > A = 10
> > > B = 11
> > > C = 12
> > > D = 13
> > > E = 14
> > > F = 15
> > >
> > > So the hexidecmal number for would be C56. When doing this
[/color]
convertion,
> > make
> > > sure you keep the order of the bits as the original or you'll wind up

> with
> > a
> > > wrong hex number.
> > >
> > > I know this is a more involed method than Ralph's excellent chart

but
> I
> > > thought I'd post this in the hopes that you can see how and why

Ralph's
> > > chart "works".
> > >


Your more involved method served only to confuse (particularly with the
wrong answer)
Converting between decimal, binary and hex is not rocket science and doesn't
require involved methods.
First learn decimal to binary, then binary to hex. Work with 8 bit numbers.
Memorize place values for 8 bit numbers. Not hard, its a pretty easy
progression.
Remember to convert bin to hex 4 bits at a time.
Remember the highest decimal value a 4bit segment can have is 15 (8+4+2+1)
Remember the highest decimal value for single character in hex is 15 (F)


Easynews

2003-06-16, 12:23 pm

You are right about the calculation error, I stand corrected. But you are
mistaken when you say that the method is incorrect. My method is correct, I
simply made a calculation error. Thank you for pointing this out and I
apologize for any confusion this might have caused.
"JK_Deth" <john1@telpage.net> wrote in message
news:veq7hoitfqt69e@corp.supernews.com...
> Two points:
>
> 1. Although its interesting to learn, you don't need this for the A+
>
> 2. Your 'system' is wrong. Your answers are incorrect. The methods you
> outline will always give an incorrect answer.
>
> Check in line to see where flubbed it on the math. But on the whole the

post
> was confusing and a poor example as a 'teaching exercise'.
>
>
> You begin by stating your converting bin to hex.
>
> > > > Brain, in order to convert binary in hex you need to divide a binary
> > > > number into 4 bit chucks; 101001010110--->1010-0101-0110 (the dash

> > between
> > > > the bits are there just as a visual aid for separating the 4 bit

> > chucks).

>
> You did okay so far sperating into 4 bit groups part works converting bin

to
> hex. Using your example above you get this:
>
> 1010 - A
> 0101 - 5
> 0110 - 6
>
> > > > A binary bit represents

>
> All that info was unneccesary really, someone learning conversion should
> first learn the systems.
>
> > > > 256 128 64 32 16 8 4 2

> > 1
> > > > 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
> > > >

>
> > > > So let's take the first chuck of our above example; 0110. We start

> on

> > > the
> > > > rightmost bit and start taking note of which bits are ON or have

ones.
> > We
> > > > see that the 2nd and 3rd digits have ones. When we note what is

their

> > > > relative positions within the 4 bit number. We see that they take

up
> > the
> > > > 2nd and 3rd positions. Now if you take a look at the chart we

created
> > > above,
> > > > you see that the 2nd bit has a whole number value of 2 and the 3rd

bit
> a
> > > > vulue of 4. Now all we have to do is add all these values and we get

> our
> > > > whole number value for the 4 bit number, which is 0+4+2+0 = 6. The

> other
> > > > values for the final two chunks are 0101 = 0+4+0+1 = 5 and 1010 =

> > 8+0+4+0

>
> First math error 1010 would be 8+0+2+0 or 10
>
>
> > > =
> > > > 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23
> > > >

>
> There was really no poimt in adding all three chunks, the 23 is arrived at
> erroneously and has no meaning.
> (The decimal value of the binary number you began with is 2646)
>
> > > > Now to conver binary into hexidecimal, we proceed the same way we

> did
>
> I thought that was what we were doing already?
>
> > > > previously by separating the bits in 4 bit chucks and converting to

> > whole
> > > > number. Taking our above example 12+5+6,
> > > > any number less or equal to nine remains untouched. Any number

greater
> > > than
> > > > 9 is assigned a letter starting with A so:
> > > > A = 10
> > > > B = 11
> > > > C = 12
> > > > D = 13
> > > > E = 14
> > > > F = 15
> > > >
> > > > So the hexidecmal number for would be C56. When doing this

> convertion,[color
=darkred]
> > > make
> > > > sure you keep the order of the bits as the original or you'll wind
[/color]
up
> > with
> > > a
> > > > wrong hex number.
> > > >
> > > > I know this is a more involed method than Ralph's excellent chart

> but
> > I
> > > > thought I'd post this in the hopes that you can see how and why

> Ralph's
> > > > chart "works".
> > > >

>
> Your more involved method served only to confuse (particularly with the
> wrong answer)
> Converting between decimal, binary and hex is not rocket science and

doesn't
> require involved methods.
> First learn decimal to binary, then binary to hex. Work with 8 bit

numbers.
> Memorize place values for 8 bit numbers. Not hard, its a pretty easy
> progression.
> Remember to convert bin to hex 4 bits at a time.
> Remember the highest decimal value a 4bit segment can have is 15 (8+4+2+1)
> Remember the highest decimal value for single character in hex is 15 (F)
>
>



ImhoTech

2003-06-16, 12:24 pm

Why are you posting a reply to a message thats over a month old? Did it take
you that long to figure this involved method out. (That incidently is posted
all over the internet, probably would have been better for you to simply
have cut and pasted someone else's more organized and well thought out
article)


"Easynews" <none@none.com> wrote in message
news:7w0Ha.1216897$vw6.9064165@news.easynews.com...
> Brain, in order to convert binary in hex you need to divide a binary


> 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23


Why in the world would you want to do that!

> Now to conver binary into hexidecimal, we proceed the same way we did
> previously by separating the bits in 4 bit chucks and converting to whole


Huh? What then were you trying to do before. If you were trying to convert
binary to decimal you failed miserably.



Easynews

2003-06-16, 1:23 pm

My news server has long retention time. I simply was trying to help brian
with his question. If I knew the hounds of hell were going to descend upon
me, I wounldn't have posted anything at all! LOL
"ImhoTech" <bobo@yodelers.net> wrote in message
news:veru7voipunbd9@corp.supernews.com...
> Why are you posting a reply to a message thats over a month old? Did it

take
> you that long to figure this involved method out. (That incidently is

posted
> all over the internet, probably would have been better for you to simply
> have cut and pasted someone else's more organized and well thought out
> article)
>
>
> "Easynews" <none@none.com> wrote in message
> news:7w0Ha.1216897$vw6.9064165@news.easynews.com...
> > Brain, in order to convert binary in hex you need to divide a binary

>
> > 12. Now we add all three chucks to get a grand total of: 12+5+6 = 23

>
> Why in the world would you want to do that!
>
> > Now to conver binary into hexidecimal, we proceed the same way we did
> > previously by separating the bits in 4 bit chucks and converting to

whole
>
> Huh? What then were you trying to do before. If you were trying to convert
> binary to decimal you failed miserably.
>
>
>



Developwebsites

2003-06-20, 11:23 am

if this is still on the test then I wont even bother. I mean there aint no
jobs and the test costs what? $300?
the A+ course costs $300.
I should be out $600 and get nothing for it.
FORGET IT!

--------------------------------------------------
remove *batSPAM* to e-mail me
--------------------------------------------------
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net