View Single Post
Captain Maxx Power
Hasbro(tm)
Captain Maxx Power's Avatar
Location: In all good toy shops
#11
Default

Originally Posted by Eminem's_No.1_Fan ^

What are hex and binary
Short answer, Hex and Binary are two ways in which computers deal with the millions of values flying about the place. Binary is a series of bits that can be either in an "on" position, or an "off", or 1 or 0. Depending on the type of Binary coding being used, different sequences of numbers will produce different binary. A general rule of thumb is that, counting from the right to left, each bit represents a value twice as large as the one before it. So for example 01101 represents the numbers 16, 8, 4, 2 and 1 respectively. Because 8, 4 and 1 are "on", they are added up to make the final value, 13.

Hex is a bit different. Short for Hexidecimal, it uses a base-16 pattern to store values. These values go from 0 to F (F being 15). A value such as 4A2 would be 010010100010, or 1186. Values on NES games were commonly stored as Hex numbers, since it was the smallest possible way to store a value within the limited space of a cartridge. Now values in these games, going above the designated space, will switch to Hex in order to represent themselves, since the number cannot display beyond a set number of digits (in the case of the HP problem, four digits). In some cases, a game/program may start using various other symbols if the value goes beyond F or, in the case I stated, simply keep on tallying but displaying it accordingly. The overflow I was talking about is when a value goes beyond the designated bit space allocated to this. It can cause a number of scenarios, including the value being capped back down to it's maximum, the value looping back around to 0 (or the minus value of the maximum if the number is set to be negative), or it may just plain crash the game.
Old 08-20-2006, 07:29 PM
Reply With Quote
Captain Maxx Power is offline