Re: what is Hex?

  • From: "Ian D. Nichols" <inich@xxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 21 Feb 2008 17:39:50 -0500

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

Other related posts: