Why Hex?

Started by
30 comments, last by Daishim 21 years, 10 months ago
A9 00
8D 20 D0
8D 21 D0
60

How silly. Still remembering some machinecodes.
Advertisement
quote:Original post by Michalson
Young folk today have it easy, too few addressing modes is their problem.


The 68k had what... 15 addressing modes (including post-increment and post-decrement) ?

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
I read once that before grouping bits by 8 in the memory, bits where grouped by 4, thus using hexadecimal representation, you could represent such memory unit with only one digit.

The only thing I don''t like in hexa (except that my brain doesn''t auto convert hexa to decimal and vice-versa, except some special values) is that keyboard are not designed to type hexa.

It would be great if someone could make an hexa numeric-pad


----
David Sporn AKA Sporniket
quote:
It's much better than decimal in almost all respects... Check this out: http://www.intuitor.com/hex/switch.html


You can't use Hex as our number system, for the simple fact that you'd get confused. They'd need different symbols for the 10-15 values instead of A-F if it was to work.

Consider the numbers FACE, CAFE, BEEF, ACE. Doesn't work too well when mixed in with words.

Also, from that article, dividing a line into segments has absolutely no relation to doing mathematical calculations with numbers.

Oh yeah, and you can't count to 16 on your fingers!


[edited by - cgoat on June 7, 2002 2:25:46 PM]
quote:Original post by felonius
Hehe, and you probably all recall the "good old days" when we programmed machine code on our Commodore 64 by placing hex values directly in memory after looking your hand-written assembler program up in the opcode table... < shivers >


I know C compilers were made in assembly, but now I know what the assembler was made in!

the only win32 opcodes I remeber know are eb (short jump), e9 (long jump), 90 (nop) and b8 (mov eax, const). wonder what I use them for?
>> I know C compilers were made in assembly, but now I know what the assembler was made in!

But thank god we had hexes. The people before us had to work in binary digits. The first real computers (such as ENIAC from WWII - the mechanical analytical engines from the 19th century do not count) had large boards with a switch for each bit. You then programmed it by pressing switches. In that perspective hex-coding is very efficient and easy. On the other hand the memory wasn't so large so it wasn't that big of problem. Well, physically ENIAC *was* large - 80 feet long and 8.5 wide, but had only 18.000 vacuum tubes. Anyway, people found out that they could do this more efficiently by creating a large stencil with holes where the switches should *not* be pushed and then they pressed that over all the switches at once. The first "instant" software loader was invented

But seriously, C/C++ compilers are no longer written in pure assembler and assemblers are not written in just opcodes. That was just the first ones. Today we use cross-compilation and bootstrapping to avoid having to dig into low levels. So today all of them are written in C or C++ (or some other higher level language).

[edited by - felonius on June 7, 2002 3:35:45 PM]
Jacob Marner, M.Sc.Console Programmer, Deadline Games
quote:Original post by cgoat
Oh yeah, and you can''t count to 16 on your fingers!


Yes you can! In fact, you can do it on one finger. Furthermore, you can count to 1023 on both hands, and 1048575 using your toes.

Just treat each of your fingers as a binary digit (no pun intended).

Right thumb = 1
Right index = 2
Right middle = 4
Right ring finger = 8
Right pinky = 16
Left pinky = 32
Left ring finger = 64
Left middle = 128
Left index = 256
Left thumb = 512

Ta da. Your hands are a 10 bit number.
quote:Original post by Anonymous Poster
Ta da. Your hands are a 10 bit number.


GEEK !

-------------Ban KalvinB !
quote:Original post by felonius
The people before us had to work in binary digits. The first real computers (such as ENIAC from WWII - the mechanical analytical engines from the 19th century do not count) had large boards with a switch for each bit. You then programmed it by pressing switches.


The ENIAC may have been the basis for all modern computing machinery, but it WAS in fact a Base 10 system -- one of its many problems. For each digit you had to have ten vacuum tubes, one for each possible value for 0-9. Using binary in electronics was not so patently obvious in the early days. Otherwise your point stands.

quote:Original post by granat
Ta da. Your hands are a 10 bit number.

GEEK !

Don''t tell me you never thought about that! For shame, granat!

This topic is closed to new replies.

Advertisement