Funny how people even Programmers are confused by Hexadecimal
This is Funny how Some people get quite confused about simple Hex Base 16 System with 0123456789ABCDEF characters,
and bring in all kinds of other things to confuse things..... when really it's simple.
Like thinking about the the ASCII value of the character stored for screen that represents the hex character 0-9 A-F
so for Example as ASCII value of "5" = Hex "35" or binary 0011 0101 has some revalance....
and another complicate things further thinking as 0 to 9 take so many bits ...As there still thinking hex as displayed ASCII characters.
You see another get confused thinking hex is fixed to a byte as thats most commonly way hex is used 2 hex characters to represent a Byte.
But hex can be any number of digits
D
DE
DEA
DEAD
AS can Decimal numbers
0
12
123
1234
My name in here is yazakchat1 and user in RED I am talking to.
Here is some chat posted in a help room on July 28th 2007
yazakchat1: delphiprogrammercraig
hex is 4 bit
delphiprogrammercraig: 8 bits in a byte you idiot
yazakchat1: delphiprogrammercraig
1 byte is 8 bits
delphiprogrammercraig: 0 - FF = 1 byte
delphiprogrammercraig: venom, these VB coders
think 4 bits in a byte
delphiprogrammercraig: i hope
zak don't take up assembly
yazakchat1: delphiprogrammercraig
a hex digit is 4 bits
yazakchat1: delphiprogrammercraig
always has been
deepthawt: he's probably thinking of
BCD
delphiprogrammercraig: a hex digit is not 4 bits!
delphiprogrammercraig: a hex digit is 8 bits
delphiprogrammercraig: my god
yazakchat1: delphiprogrammercraig
0 1 2 3 4 5 6 7 8 9 a b c d e f .......0000 - 1111......4 bits
delphiprogrammercraig: Zak,
stop smoking crack from your crack pipe for a few hours
deepthawt: the hex value of the ascii
digit '0' is 48 in decimal which in binary is 00110000 which is clearly more
than 4 bits. and hex CHARACTERS are ascii characters not control characters
_reen: Two hexadecimal digits can represent eight binary digits, or a byte.
yazakchat1: delphiprogrammercraig
a byte is 2 hex digits....... 8 bits...... represented by 2 hex
digits
ven0m.cha0s: Its primary purpose is to represent the binary code
in a format easier for humans to read, and acts as a form of shorthand, in
which one hexadecimal digit stands in place of four binary bits. For example,
the decimal numeral 79, whose binary representation is 01001111, is 4F in
hexadecimal (4 = 0100
delphiprogrammercraig: it's
ok, zak will be fine when he stops smoking crack
deepthawt: not only that but 0-9 and
a-f are not contiguous, so clearly fall short of the "4 bits" character
yazakchat1: delphiprogrammercraig
you dont even understand the basics
delphiprogrammercraig: zak,
you have 2 coders in the room who DON'T agree with you
delphiprogrammercraig: you're out numbered and
wrong
yazakchat1: delphiprogrammercraig
lol
delphiprogrammercraig: DEEPTHAWT: not only that
but 0-9 and a-f are not contiguous, so clearly fall short of the "4 bits"
character
delphiprogrammercraig: Zak
so you're saying both me and deep are wrong (and yes first time ever i agree
with him)
_reen: Two hexadecimal digits can represent eight binary digits, or a byte. <<
yazakchat1: delphiprogrammercraig
hex is 4 bits
deepthawt: the values 0-15 can be represented
in 4 bits, but that is not the 'hex representation' the hex representation
is not the raw value it is the value expressed in ASCII as digits 0-9 and
a-f
yazakchat1: ocal
is 3 bits
yazakchat1: octal
yazakchat1: 0-7
delphiprogrammercraig: zak,
do you know what a Register is?
delphiprogrammercraig: a CPU Register
yazakchat1: delphiprogrammercraig
a regiter is a temp store,,,,,,used for fast accesss....by the
cpu
venom_cha0s_king: What's 4 hex bytes then?
16?
yazakchat1: cpu
delphiprogrammercraig: ok i've
had enough of this, if zak want's to believe 1 byte is 4 bit, let him
yazakchat1: hexadecimal
is just a easyer way to do Binary,,,,,, representing four binary bits
delphiprogrammercraig: zak,
you show me a 4 bit register to do half a byte using hex, show me
yazakchat1: delphiprogrammercraig
the 4040 had 4 bits registers
deepthawt: can do a nibble swap on
an Atmel ATMEGA series micro ![]()
delphiprogrammercraig: so what... in 4 bits
you can NOT handle $FF
delphiprogrammercraig: and $FF is hex
delphiprogrammercraig: since you can not
handle $FF hex is 8 bits
delphiprogrammercraig: so shut up
yazakchat1: maybe
4004
yazakchat1: hang
on let me look it up
yazakchat1: The Intel 4004, a 4-bit central
processing unit (CPU) released by Intel Corp. in 1971 , is widely considered to
be the world's first commercial single-chip microprocessor . The 4004 employed
a 10µm silicon-gate PMOS technology and could execute approximately 60,000
delphiprogrammercraig: yes but you can have a
32 bit register on an intel / clone CPU
yazakchat1: http://en.wikipedia.org/wiki/Intel_4004
<---- Craige there you go
delphiprogrammercraig: in order to deal with
hex, you need 1 byte
delphiprogrammercraig: otherwise you're only
going to get half of the value which would no longer make it hex
yazakchat1: delphiprogrammercraig
now say your sorry
venom_cha0s_king: Hexadecimal
is primarily used in computing to represent a byte. <<< Quoted from
Wikipedia.
delphiprogrammercraig: i'm not going to say
sorry when i'm right
yazakchat1: delphiprogrammercraig
hex is 4 bits
delphiprogrammercraig: you can't manipluate
hex with 4 bits
delphiprogrammercraig: you can with 8 bits
delphiprogrammercraig: and more
delphiprogrammercraig: you can have from 0 to
40 but nothing more ![]()
delphiprogrammercraig: wtf is the point of
that
deepthawt: "hex" is not a
substantive thing its a representation of a number the number of bits in the
number dictate the hex representation, hex representation is in ASCII geez
deepthawt: it takes one ascii character
to represent a single hex digit
delphiprogrammercraig: if you want to edit a
an 8 bit register you can use hex to view it as 1 byte
yazakchat1: 0
to 9 A to F .....is four bits...... 0000 0001 0010 0011 0100 0101 0110 0111
1000 1001 1010 1011 1100 1101 1110 1111