From: Tu Nguyen (tunguyen@xxxxxxxxxxx)
Date: Thu Apr 04 2002 - 18:10:29 GMT-3
Hi,
Here is another way of doing it.
Dec 128 64 32 16 8 4 2 1
157 1 0 0 1 1 1 0 1
128+16+8+4+1=157 Dec
10011101= Binary
Split them up into two group
1001 1101
8 4 2 1 Dec
1 0 0 1= 9 Dec
1 1 0 1= 13 Dec
Dec >> Hex
9 >> 9
13 >> D
Hope This Help,
Tu Nguyen
JNCIE#51, CCNP, CCDP, CCSA, CCSE, MCSE
Sr. Network Engineer
Juniper Networks
1184 N Mathilda Avenue
Sunnyvale, CA 94089
Email: tunguyen@juniper.net
-----Original Message-----
From: jeff gercken [mailto:jeffgercken@hotmail.com]
Sent: Thursday, April 04, 2002 10:59 AM
To: ccielab@groupstudy.com
Subject: Fwd: hex conversion
The method I use is to first convert to binary then hex. It normally
works
quickly since you rarely have to convert anything over 255.
Say you wanted to convert 153 to hex
157 = 10011101
the math behind that is:
157-128=29 10000000
29-16=13 00010000
13-8=5 00001000
5-4=1 00000100
1-1=0 00000001
now split up the binary into groups of 4
1001 1101
Convert each group back to a decimal
9 13
Now match the numbers >10 with the appropriate letter and combine
9D
I don't think there is an 'easy way' unless you have a calculator.
Jeff
>From: "Ahmed Mamoor Amimi" <mamoor@ieee.org>
>Reply-To: "Ahmed Mamoor Amimi" <mamoor@ieee.org>
>To: "Christopher M. Heffner" <cheffner@certified-labs.net>,
"Chua,
>Parry" <Parry.Chua@compaq.com>, "Keith E Decker"
><st5ba@Bayou.UH.EDU>, <Giveortake@aol.com>
>CC: <ccielab@groupstudy.com>
>Subject: Re: hex conversion
>Date: Thu, 4 Apr 2002 20:32:21 +0500
>
>I think that Parry have told is much easier solution.
>
>-Mamoor
>
>
>----- Original Message -----
>From: Christopher M. Heffner <cheffner@certified-labs.net>
>To: Chua, Parry <Parry.Chua@compaq.com>; Keith E Decker
><st5ba@Bayou.UH.EDU>; <Giveortake@aol.com>
>Cc: <ccielab@groupstudy.com>
>Sent: Thursday, April 04, 2002 9:59 AM
>Subject: RE: hex conversion
>
>
> > That just hurts to even look at ...
> >
> >
> >
> >
>=======================================================================
=====
>======
> > Christopher M. Heffner
> > IMCR Course Director
> > Certified Cisco Systems Instructor
> > CCSI, CCIE, MCT, MCSE, MCNI, MCNE, CLI, PCLP, FCSE, ASE, CTT, A+
> > cheffner@certified-labs.net
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf
Of
> > Chua, Parry
> > Sent: Wednesday, April 03, 2002 11:04 PM
> > To: Keith E Decker; Giveortake@aol.com
> > Cc: ccielab@groupstudy.com
> > Subject: RE: hex conversion
> >
> >
> > If you need to use hand written coversion, this is the faster way:
> >
> > 1. covnert to oct, decimal/8, eg dec:1234 = 0ct 2322
> > 2. Break the result of each oct digit into 3 bit binary ,2322 = 010
011
>010 010
> > 3. Group from right to left into 4 bit binary and write in hex
> > 0100 1101 0010 = hex 4D2
> >
> > Parry Chua
> > -----Original Message-----
> > From: Keith E Decker [mailto:st5ba@Bayou.UH.EDU]
> > Sent: Thursday, April 04, 2002 11:39 AM
> > To: Giveortake@aol.com
> > Cc: ccielab@groupstudy.com
> > Subject: Re: hex conversion
> >
> >
> > Hex conversion...very similar to base 10 number system, only it's
powers
> > of 16, not powers of 10.
> >
> > For example... base 10 number system we all know and love:
> >
> > 5195
> >
> > This is the same as:
> >
> > 5*10^3 + 1*10^2 + 9*10^1 + 5*10^0
> >
> > or
> >
> > 5000 + 100 + 90 + 5
> >
> > HEX is base 16, so you could have something like this:
> >
> > 0x7CA8
> >
> > This is the same as:
> >
> > 7*16^3 + C*16^2 + A*16^1 + 8*16^0
> >
> > or
> >
> > 7*4096 + 12*256 + 10*16 + 8
> >
> > 28672 + 3072 + 160 + 8 = 31912
> >
> > As for translating the letters into numbers, that's pretty easy:
> >
> > HEX DEC
> > === ===
> > 0 0
> > 1 1
> > 2 2
> > 3 3
> > 4 4
> > 5 5
> > 6 6
> > 7 7
> > 8 8
> > 9 9
> > A 10 <-- Base 10 has no more digits and recycles here
> > B 11 Base 16 has six more "digits" and keeps going
> > C 12
> > D 13
> > E 14
> > F 15
> >
> > Keith
> >
> > On Wed, 3 Apr 2002 Giveortake@aol.com wrote:
> >
> > > Any have a GOOD link for Hex conversion? I am looking for a
tutorial
>not a
> > > calculator!! Ok a calculator would help me check my work too!
> > >
> > > Thanks,
> > >
> > > David
This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:57:54 GMT-3