Jump to content


Photo

Hexadecimal

anybody know it?

24 replies to this topic

Poll: Do you know Hexadecimal? (31 member(s) have cast votes)

Do you know Hexadecimal?

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote Guests cannot vote

#1 NerfMonkey

NerfMonkey

    Member

  • Members
  • 1,821 posts

Posted 28 August 2005 - 11:03 PM

The name of the poll says it. I'm wondering if anyone here knows how to count in Hex. It's the language used in GameShark Pro 3.3, which I'm extremely interested in for messing around with Quake II a bit. :( I'm trying to learn it, and I think I'm starting to understand it, but not really. It's really hard for me to get, but I really, really want to learn it so I can try my hand at hacking with the GS eventually.
  • 0
SexD Warves

#2 cxwq

cxwq

    Member

  • Founders
  • 3,634 posts

Posted 29 August 2005 - 01:14 AM

Don't they still teach alternate bases in 5th grade or something like that? My mom's a 3rd-4th grade teacher and she does binary arithmatic.

I can't remember a time when I wasn't able to convert hex, oct, dec, and bin.
  • 0
<meta name="cxwq" content="mostly water">

#3 NerfMonkey

NerfMonkey

    Member

  • Members
  • 1,821 posts

Posted 29 August 2005 - 01:22 AM

Nope, most of the teachers around here have never even heard of Hex. They didn't teach us shit about Binary, Hex or anything yet and I'm going into eighth grade.

Was it hard for you to learn? Maybe I'm just an idiot, but I've read about ten explanations and haven't understood any of it. All I know is the base sixteen, 0-F.

Edited by NerfMonkey, 29 August 2005 - 01:40 AM.

  • 0
SexD Warves

#4 Jakethesnake

Jakethesnake

    Member

  • Members
  • 176 posts

Posted 29 August 2005 - 01:26 AM

Yeah, I've never even heard of it.
  • 0

#5 cxwq

cxwq

    Member

  • Founders
  • 3,634 posts

Posted 29 August 2005 - 03:31 AM

Okay, here's as simple an explanation as I can come up with at this hour. There are probably lots of better ones out there:

Notation: When I type x^y it means "x raised to the y power"

Decimal

You multiply each digit by a power of 10 and add them together to get the total.

1234
= 1 x 10^3 + 2 x 10^2 + 3 x 10^1 + 4 x 10^0
= 1 x 1000 + 2 x 100 + 3 x 10 + 4 x 1
= 1234 (decimal)

Binary

You multiple each digit by a power of 2 and add them together to get the total.

1010
= 1 x 2^3 + 0 x 2^2 + 1 x 2^1 + 0 x 2^0
= 1 x 8 + 1 x 2
= 10 (decimal)

Hex

You multiply each digit by a power of 16 and add them together to get the total where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

89AB
= 8 x 16^3 + 9 x 16^2 + 10 x 16^1 + 11 x 16^0
= 8 x 4096 + 9 x 256 + 10 x 16 + 11 x 1
= 32768 + 2304 + 160 + 11
= 35243 (decimal)

If you're into computers you should recognize the powers of 2 (and thus the powers of 16, natch.) 1024 (2^10) MB = 1 GB and recent processor architecture has moved from 16-bit (2^5) to 32-bit (2^6) and now to 64-bit (2^7).
  • 0
<meta name="cxwq" content="mostly water">

#6 Talio

Talio

    Not your mother

  • Contributors
  • 2,781 posts

Posted 29 August 2005 - 07:55 AM

Study digital electronics and you will be fluent in just about every form of base counting known to man. Trust me, you'll just know it. You'll also be a raving lunitic trying to solve everyday problems with the aid of led's and gates in your head. Small price to pay.

Talio.
  • 0
New posts on my blog, check it out. - Click on the ad too, cause I get money per click. Give back to the Admin team for once!

#7 Death

Death

    Ass-Kicking Overlord

  • Contributors
  • 226 posts

Posted 29 August 2005 - 08:23 AM

The name of the poll says it. I'm wondering if anyone here knows how to count in Hex. It's the language used in GameShark Pro 3.3, which I'm extremely interested in for messing around with Quake II a bit. :( I'm trying to learn it, and I think I'm starting to understand it, but not really. It's really hard for me to get, but I really, really want to learn it so I can try my hand at hacking with the GS eventually.

cxwq does an excellent job of explaining how to count in Hexadecimal, and how to convert from Hex to Dec, and vice versa. However, I saw one main part of your question which has not been addressed.

Hexadecimal is not a language. It's a number system. You use it for the same things you would use normal numbers for.

Now, here comes the long part. Computers, when you get right down to it, are nothing but Logic Processors. Think of a light switch: it only has two positions-- on and off. Your computer (and video game systems and anything else based on computation) consists of a whole bunch of tiny switches like this. They can either be on or off.

When computer scientists, computer engineers, and electrical engineers are working on a system from the ground up, they tend to represent everything mathematically. As such, "on" and "off" are symobolized in such mathematics as "1" and "0" respectively. Since there are no other states besides 1 and 0, mathematics are carried out in the binary number system. So instead of 0, 1, 2, 3, 4 (because the symbols 2, 3, and 4 don't equate to "on" and "off") you count 0, 1, 10, 11, 100.

Now, hexadecimal is shorthand for binary. When you've only got two digits (0 and 1), big numbers become very, very long to write out (for example, 255 in decimal is equal to 11111111 in binary). The word Hexadecimal literally means "pertaining to the number sixteen," while Binary means "pertaining to the number two." Sixteen is two to the fourth power, or 2*2*2*2. Therefore every single digit in Hexadecimal represents FOUR digits of a Binary number. So, "255" in decimal equals "11111111" in binary, which in turn equals "FF" in Hexadecimal. It just makes life a bit easier when doing the massive amounts of math necessary in designing a system.

Now, back to my original point. Hexadecimal is not a language. However, Machine Code IS a language-- specifically, Machine Code is a sequence of "on" and "off" states which the computer follows in order to execute some process. In programming, Hexadecimal is just an easier way of representing that Machine Code. However, it is EXTREMELY rare to actually write Machine Code directly. In all honesty, I've been coding for fifteen years, and I've done this on perhaps four occasions. All of which were academic.

Now, I don't mean this post to dissuade you from learning about computers or trying to hack with a GameShark-- on the contrary, I'd be elated to learn that this post helped you achieve such a goal. I'm just trying to help you understand that there's a lot more to that little GameShark code than you may have realized.
  • 0

DEATH
 

Let a man never stir on his road a step
without his weapons of war;
for unsure is the knowing when need shall arise
of a spear on the way without.  --Hávamál 38

#8 NerfMonkey

NerfMonkey

    Member

  • Members
  • 1,821 posts

Posted 29 August 2005 - 12:06 PM

Thank you so much. I'm interested in learning the inner workings of the system and Shark. It's why I bought the thing - I'd much rather learn how something works and then use it to do things that can't normally be done (hence the hobby Nerfing) than use a cookie cutter type style of doing things. I understand Hex now and Bin is starting to make a lot more sense. Thanks guys, that helped a lot. I've got a book that has a section on Binary in it; it uses boxes full and empty of pumpkins starting at two per row and going up to 1,024 I think. That made it pretty simple but now I really get it. Thanks again.
  • 0
SexD Warves

#9 Forsaken angel24

Forsaken angel24

    Member

  • Contributors
  • 2,472 posts

Posted 29 August 2005 - 03:54 PM

First thing that came to mind was reboot. I know "what a dork"
  • 0
I don't get my kicks out of you,
I don't feel the way I used to do.
I know its bad,
After what we had,
But I’m just not the angel you knew.

#10 Davis

Davis

    Member

  • Members
  • 210 posts

Posted 29 August 2005 - 04:01 PM

First thing that came to mind was reboot. I know "what a dork"

The show? :blink:
Posted Image
Haha, I can't even remember if that is the name of that show, but you saying that qued me back to years ago the little green kid tapping his chest and saying, "Reboot!"
  • 0
QUOTE ("Devious")
2. Laugh like a maniac as you pummel them with your balls.

#11 Black Wrath

Black Wrath

    Member

  • Members
  • 1,071 posts

Posted 29 August 2005 - 04:22 PM

I loved that show, Reboot. No matter how cheesy it was, I'll still watch it today, just because those games were so cool.
  • 0
Xx_Black-Wrath_xX of The Canadian Foam Militia

Not in the game anymore, but it was great while it lasted. Thanks for the great years of fun, NH!
--
Resident "Spawn of Talio"

#12 NerfMonkey

NerfMonkey

    Member

  • Members
  • 1,821 posts

Posted 29 August 2005 - 05:34 PM

Wait, there's something that I'm not getting.
When I do 8 x 16^3 + 9 x 16^2 + 10 x 16^1 + 11 x 16^0, I get 134,254,76.30. Am I doing the operations wrong? 16^3 would be 16x16x16, right? So then that would be equal to 4,096. 4,096x8=32,768. So that's not the way you do it, right? Because that means that I get a number that's way too huge. What am I doing wrong?

Is it that the calculator I'm using misinterprets 4,096+9x256 to mean 4,096+9=5,003x256, equaling 1,280,768? I'm using a standard printing calculator, I think I'd need to use one (like a Google calculator) that can use parentheses to change the order of operations.

Edited by NerfMonkey, 29 August 2005 - 05:39 PM.

  • 0
SexD Warves

#13 cxwq

cxwq

    Member

  • Founders
  • 3,634 posts

Posted 29 August 2005 - 05:39 PM

8 x 16^3 + 9 x 16^2 + 10 x 16^1 + 11 x 16^0

can also be represented as:

(8 x 16^3) + (9 x 16^2) + (10 x 16^1) + (11 x 16^0)

I left off the parens because operator precedence is ^, then x, then +.

You are correct in your first assertion however, 16^3 x 8 does in fact equal 32,768 as I illustrated in my calculations above.

Edit: Correct again. When you're using a 'dumb' calculator you need to feed it the operators in the correct order. I prefer RPN (HP calcs) because parens aren't necessary when you use entirely postfix operators, though TI calcs can handle the parens just fine.
  • 0
<meta name="cxwq" content="mostly water">

#14 NerfMonkey

NerfMonkey

    Member

  • Members
  • 1,821 posts

Posted 29 August 2005 - 05:40 PM

Haha, exactly what I thought, I guess my edit was too late for you to see. Thanks a lot cx.
  • 0
SexD Warves

#15 Hunter

Hunter

    Member

  • Members
  • 312 posts

Posted 29 August 2005 - 05:58 PM

Hex is a cool character on Reboot.
  • 0
Hunter
Organizer Vancouver Area Nerf Series

#16 Forsaken angel24

Forsaken angel24

    Member

  • Contributors
  • 2,472 posts

Posted 30 August 2005 - 02:55 AM

When Enzo became Matrix the show became really badass!
  • 0
I don't get my kicks out of you,
I don't feel the way I used to do.
I know its bad,
After what we had,
But I’m just not the angel you knew.

#17 Death

Death

    Ass-Kicking Overlord

  • Contributors
  • 226 posts

Posted 30 August 2005 - 08:54 AM

8 x 16^3 + 9 x 16^2 + 10 x 16^1 + 11 x 16^0

can also be represented as:

(8 x 16^3) + (9 x 16^2) + (10 x 16^1) + (11 x 16^0)

I left off the parens because operator precedence is ^, then x, then +.

You are correct in your first assertion however, 16^3 x 8 does in fact equal 32,768 as I illustrated in my calculations above.

Edit: Correct again. When you're using a 'dumb' calculator you need to feed it the operators in the correct order. I prefer RPN (HP calcs) because parens aren't necessary when you use entirely postfix operators, though TI calcs can handle the parens just fine.

Hardcore. Reverse Polish Notative calculators are a niche market, nowadays. Parenthetical notation be damned!
  • 0

DEATH
 

Let a man never stir on his road a step
without his weapons of war;
for unsure is the knowing when need shall arise
of a spear on the way without.  --Hávamál 38

#18 ompa

ompa

    Introductinator

  • Moderators
  • 2,368 posts

Posted 30 August 2005 - 09:19 AM

Wow... I thought I was the only person that watched Reboot. I thought the show was canceled quite some time ago?

Talio, Death, Cx, I could easily take that type of course in college I presume? I'm in 12th grade and there is only one course available that MIGHT teach you counting. It's certainly not required, and I just don't have room in my high school schedule. Nonetheless, if I actually find time, I'd love to get into programming... I've always wanted to, just my laziness and quasi-crammed schedule have got in the way.

~ompa
  • 0

#19 cxwq

cxwq

    Member

  • Founders
  • 3,634 posts

Posted 30 August 2005 - 10:26 AM

Talio, Death, Cx, I could easily take that type of course in college I presume?

CS 130 Discrete Structures (4)
Fundamental topics for Computer Science, such as logic, proof
techniques, sets, basic counting rules, relations, functions and recursion,
graphs and trees. 4 lectures/problem-solving. Prerequisite: MAT 105
with a grade of C or better, or consent of instructor.

CS 210 Computer Logic (4)
Boolean algebra with applications to computers and logic design. The
Arithmetic Logical Unit, logical properties of flip-flops and sequential
machines. Applied projects. 4 lectures/problem-solving. Prerequisite: CS
130 with a grade of C or better, or consent of instructor.

CS 264 Computer Organization and Assembly Programming (4)
Von Neumann machine. Instruction set architecture. Addressing modes.
Assembly programming. Arrays and records. Subroutines and macros.
I/O and interrupts. Interfacing and communication. 4 lectures/problemsolving.
Prerequisite: CS 210 and CS 240 with grades of C or better, or
consent of instructor.

CS 301 Numerical Methods (4)
Error analysis, zeros of a function, systems of linear equations,
interpolation, Chebyshev approximation, least squares approximation,
numerical integration and differentiation, random processes. 4
lectures/problem-solving. Prerequisites: MAT 208 and MAT 214 and
either CS 125 or CS 240 with a grade of C or better, or consent of
instructor.

CS 311 Language Translation and Automata (4)
Introduction to language translation. Regular expressions. Finite
automata. Lexical analysis. Context-free grammars and push down
automata. Syntax analysis. 4 lectures/problem-solving. Prerequisites: CS
241 and CS 264 with grades of C or better, or consent of instructor.

CS 450 Computability (4)
Recursive function theory. Grammar theory. Non-determinism. Turing
machines. Gödel numbering. Church-Turing thesis. Decidability. 4
lectures/problem-solving. Prererequisite: CS 311 with a grade of C or
better, or consent of instructor.


These are all Computer Science courses which deal heavily in math. Almost all the lower division courses which aren't about programming are about math. Of course CS students also need 6 quarters of classes in the math department including this one which is particularly fun:

MAT 208 Introduction to Linear Algebra (4) FWSpSu
Introduction to linear transformations of the plane, vector space of ntuples,
matrix algebra, determinants, systems of linear equations. 4
lectures/problem-solving. Prerequisite: C or better in MAT 214, or
consent of instructor.


Those classes are all from the program I finished in June. I highly recommend CS to anyone who enjoys logic, math, puzzles, and of course computers.


Death,

I still carry my HP 48G in my laptop bag and get it out even if it's just to double-check some trivial math or do some minor calculations. I hate going back to standard notation and that calculator got me through so many hours of math and physics homework it's scary. Also, the tactile response of the buttons is simply perfect. Though slow by recent TI standards, it can be had for ~$25 in great condition on eBay and is seriously fun to program and fool around with.

For those unfamiliar with RPN, the operators always follow all operands. A monary operator pulls one number off the stack, a binary operator pulls two. As an example, to calculate the average (mean) of ten [foot, inch] distances as decimal feet you'd type something like this:
92 [enter] 5 [enter] 12 / + 94 [enter] 11 [enter] 12 / + + ... 10 /

The same thing with infix (standard) notation would require the following keystrokes on a high-end calculator:

( 92 + 5 / 12 + 94 + 11 / 12 ... ) / 10

...which works, but is much less clear because it relies on the calculator understanding operator precedence.
  • 0
<meta name="cxwq" content="mostly water">

#20 Death

Death

    Ass-Kicking Overlord

  • Contributors
  • 226 posts

Posted 30 August 2005 - 11:12 AM

Computer Science is math, math, and more math. If you want to code for fun, but don't enjoy math, don't worry. You can code small programs without needing to know much math at all. But if you want to get into hardcore programming, almost everything you do requires math. Graphics, Operating System design, language compilers, statistical analysis, etc, etc, etc. Very math intensive.
  • 0

DEATH
 

Let a man never stir on his road a step
without his weapons of war;
for unsure is the knowing when need shall arise
of a spear on the way without.  --Hávamál 38

#21 The Infinite Shindig

The Infinite Shindig

    Arma-what-now?

  • Contributors
  • 1,383 posts

Posted 30 August 2005 - 11:41 AM

For those of you (ompa) that may be interested in seeing an Electrical Engineering schedule, here is what I have to walk through. I am currently in Fall of Sophomore year. It is important to note that I actually have 18 credits this semester as opposed to the 15 recommended, because I elected to take another course so I could get my core curriculum classes done early.

I've done binary and hex exercises in a bunch of classes thus far. I'm sure when I hit microprocessor design, I am going to need it. As you will also notice, my major is a ton of math. Since I started, I've had to carry two math classes at once. As of right now, I am taking multivariable calculus and differential equations concurrently. Most other engineering majors at Tech take them separately during their sophomore year, which backs up my opinion that non-EE majors are pussies.
  • 0
Shindig of the Lawn Chair Mafia

<a href="http://www.albinobla.../flash/posting" target="_blank">Posting and You</a>

#22 cxwq

cxwq

    Member

  • Founders
  • 3,634 posts

Posted 30 August 2005 - 12:39 PM

I am taking multivariable calculus and differential equations concurrently. Most other engineering majors at Tech take them separately during their sophomore year, which backs up my opinion that non-EE majors are pussies.

You'll make up for it in your senior year which is entirely restricted electives and general education.

My worst quarter was Symbolic Programming, Computer Organization, Multivariable Calculus, and The Asian American Experience. Ironically I think the last class was the hardest because I had to overcome the prof's hatred of white people.
  • 0
<meta name="cxwq" content="mostly water">

#23 boltsniper

boltsniper

    Member

  • Contributors
  • 591 posts

Posted 30 August 2005 - 02:20 PM

For those of you (ompa) that may be interested in seeing an Electrical Engineering schedule, here is what I have to walk through. I am currently in Fall of Sophomore year. It is important to note that I actually have 18 credits this semester as opposed to the 15 recommended, because I elected to take another course so I could get my core curriculum classes done early.

I've done binary and hex exercises in a bunch of classes thus far. I'm sure when I hit microprocessor design, I am going to need it. As you will also notice, my major is a ton of math. Since I started, I've had to carry two math classes at once. As of right now, I am taking multivariable calculus and differential equations concurrently. Most other engineering majors at Tech take them separately during their sophomore year, which backs up my opinion that non-EE majors are pussies.

Ha!

So are you gonna get a minor in Math? For me it was only two more Math courses in addition to what was required for the Aerospace department. A minor is pretty much worthless but I figured what the hell.

Who do you have for Maultivar and Diff EQ? If you don`t have Carl Prather you have to get him for something before you graduate! He is the greatest professor ever!

A pussy huh? I`ll have to remember that.....

I haven`t dealt with Hex in years but I recently had to refresh myself on it while diving into Xbox files to patch games. CX did a good job descibing the basics of Hex.
  • 0

#24 pinhead52

pinhead52

    Member

  • Members
  • 193 posts

Posted 30 August 2005 - 02:29 PM

I'm in computer engineering, and am actually doing microcontrollers this year. For those of you not currently studying this subject (or smart enough to just know what it is) I am expected to already know hex, and also program in machine code and assembly language. For those of you who don't know what machine code is, it's the actual binary code that the processor reads. Everything has to be done simple and stupid, such as, if I want to multiply variable x by 3, I have to load x to the processor, add x to the registry twice, then store it back in memory.

Oh, and of course I watched reboot. The web surfer was my favorite character, but he came around and left in the sort of limbo between the beginning and the late awesome episodes.
  • 0

#25 The Infinite Shindig

The Infinite Shindig

    Arma-what-now?

  • Contributors
  • 1,383 posts

Posted 30 August 2005 - 02:52 PM

Ha!

So are you gonna get a minor in Math?  For me it was only two more Math courses in addition to what was required for the Aerospace department.  A minor is pretty much worthless but I figured what the hell.


Actually, I am trying to pull off a Minor in Poli Sci just for the hell of it. If that falls through, Math it is. That of course is provided I don't bomb out of my major. I'd go off on a tanget on how Tech is out to screw you (can any one say Super-Duper Senior?), but that would push this further off topic than it already is.

Who do you have for Maultivar and Diff EQ?  If you don`t have Carl Prather you have to get him for something before you graduate!  He is the greatest professor ever!


I have Shockley for Multi and Reiss for Diff Eq. Thanks for the heads up on Prather, I'll have to keep that in mind when I pick out my math electives (for my minor). I'll have to add him to the list of Professors to try and get during my time at Tech. Too bad I got this info AFTER the add deadline.

A pussy huh?  I`ll have to remember that.....


:lol: I was wondering who would catch that. I have respect for all engineering and comp sci majors, the real people I hate are the Business (Volleyball & Booze) majors. Just remember, you're welcome to NJ wars anytime!
  • 0
Shindig of the Lawn Chair Mafia

<a href="http://www.albinobla.../flash/posting" target="_blank">Posting and You</a>


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users