RE: what is Hex?

  • From: "Ken Perry" <whistler@xxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Fri, 22 Feb 2008 08:56:10 -0800


Um I thought you were a sick puppy but come on IBM mane frame encoding?  I
guess it is pretty widely used if you count main frames worth anything.  Of
course its just another 8 bit character encoding so shrug.

Ken

Ken 

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Chris Hofstader
Sent: Friday, February 22, 2008 8:46 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: what is Hex?

Can we talk about EBCDIC now? 

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Ken Perry
Sent: Friday, February 22, 2008 11:37 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: what is Hex?


There are standards here and there about different parts of this but no
there is no one standard.  I still find that Wiki has the best definitions
of all this.  If you go to 

http://en.wikipedia.org/wiki/Byte 

You will find the best definition and history of byte and then you can
follow links to word etc from this page.  The explain how the byte is
supposed to just be the smallest character which in the past has been as low
as 5 bits but anyway I will let you all read that page and make your own
determination of what you think.

Ken

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Chris Hofstader
Sent: Friday, February 22, 2008 8:09 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: what is Hex?

I have a feeling that the definition of "WORD" may have migrated over the
years.  For that matter, the size of an int may have lost its definition
since the days that the ANSI committee left it intentionally ambiguous.

I wonder if there is some kind of ANSI/ISO glossary for computing terms?

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sina Bahram
Sent: Friday, February 22, 2008 10:03 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: what is Hex?

I was taught that word was a relative term and simply refered to an
architectural  constannt, but not one that is immutable across various
platforms.

Could be wrong, but it makes sense to think of it that way.

Take care,
Sina

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Chris Hofstader
Sent: Friday, February 22, 2008 7:18 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: what is Hex?

SB:   A standard word is a misnomer. This assumes a two byte word which is
only
true on 16-bit architecture. A word can be 16 bits, 32-bits, or even 11 bits
in some platforms ... it just depends. A double word can be 32 bits, but it
can also be 16 bits in some platforms or not even supported in others, so
there is no standard here.


Cdh:  Are you certain of this?  I was taught that, no matter what, a word
was 16 bits but the number of bits in an int was defined as "the "most
convenient" for a given processor, hence, a 6502 would have an 8 bit int, a
8086 would have 16 bits, 80386 would have 32 and so on.  

MS compilers that shipped in the 386 era fudged this by forcing an int to be
16 bits to make porting older DOS programs forward easier but had a compiler
option that would let the author select the number of bits in an int.
People I worked with back then would never declare a variable as an int as
its ambiguous definition would often come back to bite us - especially when
porting to a Macintosh 68030 or later. 

So, we would use WORD for 16 bits, DWORD for 32 bits (although I think long
was specifically defined as a 32 bit value) and used other typedefs to
minimize ambiguity and make porting easier.  Of course, the definition of
"word" may have changed since 1989.

cdh 

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sina Bahram
Sent: Thursday, February 21, 2008 11:20 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: what is Hex?

Again, I'm sorry for the disagreement, but there are several flaws in this
explanation. I've attempted to correct them below.

The standard byte's signed values are -127 to 127, not -128 to 127 ... it's
being picky, but this is extremely important and the source of 90% of most
security flaws today.

A standard word is a misnomer. This assumes a two byte word which is only
true on 16-bit architecture. A word can be 16 bits, 32-bits, or even 11 bits
in some platforms ... it just depends. A double word can be 32 bits, but it
can also be 16 bits in some platforms or not even supported in others, so
there is no standard here.

However, using twos complement, I must again clarrify the minimum and
maximum of a 16 bit value, since it is not -32768 to 32767, I'm afraid, but
is instead -32767 to 32767

As for a 32 bit value, the minimum and maximum are as follows.

Using twos complement, the signed minimum and maximum of a 32-bit integer
are -2147483647 to 2147483647 , and the minimum and maximum of an unsigned
32 bit integer are 0 to 4294967295

Hope this clears things up.

Take care,
Sina

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Ian D. Nichols
Sent: Thursday, February 21, 2008 5:40 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: what is Hex?

Hi Listers,

As I see it, things have become a little muddled here, both in James's
message and in Sina's reply.

The standard byte is still 8 bits, containing unsigned values of 0 to 255
and signed values of -128 to +127.

The word contains 16 bits, with unsigned values of 0 to 65535, and signed
values of -32768 to +32767.

The double word contains 32 bits, with very large values possible. 
Unsigned, 0 to 4 thousand millions, and signed values  from -2 thousand
millions to + 2 thousand millions, more or less.

I hope I've got my thinking straight on that, and haven't caused further
confusion.

All the best,

Ian

Ian D. Nichols,
Toronto, Canada




----- Original Message -----
From: "Sina Bahram" <sbahram@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, February 21, 2008 4:58 PM
Subject: RE: what is Hex?


A few things. big endian  versus little endian is arbritrary, so it's not a
fact with respect to storage.

More importantly, the minimum and maximum of a signed 32 bit integer is not
-65535 to 65535, it's actually -32767 to 32767

If it is signed, then it is 0 to 65535

At the end of the day, you only have 2^16 permutations of 16 bits in a
binary system; thus, you have a maximum of 65536 positions, and so you have
half as much capacity if you are using twos complement to allow for both
negative numbers and the concept of 0.

Hope this helps

Take care,
Sina

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of James Panes
Sent: Thursday, February 21, 2008 2:35 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: what is Hex?

Yes, Hexidecimal numbers are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
for a total of 16 possible digit values.

As stated before, this is much more convenient for the computer as 16 is an
even power of 2 and computers actually use binary, 0 and 1. The hexidecimal
representation is actually easier for humans to read than binary.
Hexidecimal digits are grouped into groups of 2 for a total of 16 x 16 or
256 possible values. This is a standard byte. Before unicode, a single byte
value was used to represent an alphanumeric character and two bytes or a
word were used to represent a 32 bit integer with values possible from
-65535 to 65535. This explains the limit of the size of variables in older
games.

The original Intel 8086 processor had 16 bit registers. Operations for
anything larger had to be synthisized with software.

What's more, for integer values larger than 255, the least significant pair
of digits is stored first. For example, if you were looking for the value
301 (decimal) in a game save file, you would find it represented as 23 01 in
the save file.

Since this list is about programming and not game save file hacking, I will
end my lecture here.

Anyone with further interest in this topic can write me off-list

Regards,
Jim
jimpanes@xxxxxxxxx
jimpanes@xxxxxxxxxxxx
"Everything is easy when you know how."

----- Original Message -----
From: "Valiant (on laptop)" <valiant@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, February 19, 2008 8:43 AM
Subject: Re: what is Hex?


Hi.
I didn't see anyone mention this part about hex.
Hex is just another number scale like the standard one 0 to 9 or the binary
one 0 to 1. Hex is 0 to f I think, making it bass 16, where the one we use
every day 0 to 9 is bass 10 and binary is bass, hmm, someone help? 0 to 1?
The possible digits in hex are 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f
can't remember if hex starts with 0. It lets you have larger numbers without
taking up as much space. MAC addresses on networking equipment use it.
some of that could be wrong, it's been two whole years since I had to study
that, here.

----- Original Message -----
From: "Sina Bahram" <sbahram@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Monday, February 18, 2008 4:03 PM
Subject: RE: what is Hex?


21, but yes he is, Thanks Chris

Take care,
Sina

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Marlon Brandão
de Sousa
Sent: Friday, February 15, 2008 12:12 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: what is Hex?

Are you serious about Sina being 22 years old only? Man I have seen people
who have studied computers for many more than this quantity of years and
don't seen to know a half of what Sina knows easily ...
Marlon

2008/2/15, Chris Hofstader <chris.hofstader@xxxxxxxxxxx>:
> God Sina, you bring back memories of Z80 and needing to "poke"
> instructions and data into memory before execution.  I would have 
> thought you, who was born in 1986 would never had to get to that 
> level.  Personally, I think it's a really valuable exercise even if 
> one never actually needs to use it in a "real" program just to get a
better understanding of what a processor "sees"
> and how base 16 numbers can be turned into both instructions and data 
> depending upon how the processor looks at them.
>
> In the network edition of "Bank Street Writer" a word processing 
> program written entirely in assembly, that was pretty popular in the 
> years before you learned to talk, I added a function called, 
> "DON'T_CALL_THIS."  If you did call it the program would crash as the 
> instructions looked random.  If, however, you looked at the last 
> handful of bytes of the program as ASCII, it read "FSMITHISAWORM."
> Frank Smith, a really great guy, was the client on the gig and we 
> decided to immortalize him in an Easter Egg that only an ubergeek 
> could
find.
>
> Now, just for shits and giggles, try to reconstruct the function in
> 80x86 assembly and receive the truly wasted chunk of time award.
>
> cdh
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sina 
> Bahram
> Sent: Thursday, February 14, 2008 9:28 PM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: RE: what is Hex?
>
> *smile*, wlel actually, if you really want to get down to it ... it 
> can
be.
>
> Assembler compiles down to executable instructions to the processor, 
> which are most often and most easily read in hex.
>
> I used to know almost all of the 8086 instructions and some of their 
> hex equivalents a while back. It's really useful when analysing 
> exploit and virus code.
>
> Take care,
> Sina
>
>
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall
> Sent: Thursday, February 14, 2008 8:47 PM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: re: what is Hex?
>
> Right, but it almost sounds like some sort of programming language.
>
> Have a great day,
> Alex
>
> > ----- Original Message -----
> >From: Joseph Lee <joseph.lee22590@xxxxxxxxxxxx
> >To: programmingblind@xxxxxxxxxxxxx
> >Date sent: Thu, 14 Feb 2008 17:27:12 -0800
> >Subject: re: what is Hex?
>
> >Hi Alex,
> >It's a shortened form of hexadecimal.
> >Cheers,
> >Joseph
>
> >> ----- Original Message -----
> >>From: Alex Hall <mehgcap@xxxxxxx
> >>To: programmingblind@xxxxxxxxxxxxx
> >>Date sent: Thu, 14 Feb 2008 20:18:21 -0500
> >>Subject: what is Hex?
>
> >>Hi all
> >>Whatis this Hex that has been talked about
> >recently?
>
> >>Have a great day,
> >>Alex
> >>__________
> >>View the list's information and change your
> >settings at
> >>//www.freelists.org/list/programmingblin
> >d
>
> >__________
> >View the list's information and change your settings at 
> >//www.freelists.org/list/programmingblind
>
>
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
>
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
>
>
>
> __________ NOD32 2878 (20080215) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
>
>


--
When you say "I wrote a program that crashed Windows," people just stare at
you blankly and say "Hey, I got those with the system, for free."
Linus Torvalds
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________ NOD32 2895 (20080222) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________ NOD32 2896 (20080222) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind



__________ NOD32 2896 (20080222) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: