• Starting today August 7th, 2024, in order to post in the Married Couples, Courting Couples, or Singles forums, you will not be allowed to post if you have your Marital status designated as private. Announcements will be made in the respective forums as well but please note that if yours is currently listed as Private, you will need to submit a ticket in the Support Area to have yours changed.

Word of Peace

Evangelical Quaker, YEC
Dec 27, 2003
1,259
35
✟24,090.00
Faith
Christian
Marital Status
Single
Politics
US-Libertarian
Digitalfire said:
Does anyone know what hexing is and how to do it?
Hexing is a form of sorcery. But since you're posting this in the computers forum, I'll assume you mean hex.

Hex is a short for hexadecimal, which is a system of numbers based on the number 16 rather than the number 10. The extra digits needed for this number system are represented by the letters a-f. The number 15 in hexadecimal would be "F", and the number 16 in hexadecimal would be "10".

Hex is often used when displaying numbers in the field of computers, because it takes less space to store the numbers in written form. The number 255, which is the highest number a single byte can hold, fits into two digits when written out: "FF". This is very convenient when bytes of memory are listed out.

HTML uses hex as the number system for its color codes. This is a HTML color code: "#00FFFF" (light sky blue or cyan). If this would be written out in a decimal number, it would be "0,255,255" or "000255255", which takes more space and is less concise. That's why hex is used instead.

Here's a sentence encoded into hex character codes:

54 68 69 73 20 69 73 20 61 20 73 65 6e 74 65 6e 63 65 20 69 6e 20 68 65 78 61 64 65 63 69 6d 61 6c 20 63 68 61 72 61 63 74 65 72 20 63 6f 64 65 73 2e

Each set of two digits represents a character (for example, 20 is a space, and 6f is "o"). To decode it, replace all the spaces in this hex sentence with "%", paste it into your browser's address bar, and press Go.
This is a sentence in hexadecimal character codes.
 
Upvote 0

WeakButHopeful

Senior Member
Oct 25, 2003
612
40
71
East Coast of USA
Visit site
✟15,970.00
Faith
Catholic
I hope jdunlap won't mind me adding a few things to his good explanation and cool example.

First, there's a typo in his post (at least at the moment I type this): "based on the number 18" should have been "based on the number 16".

Also, although it is correct to say that hex is more concise, the real reason it's used extensively in computers is because digital computers are based on binary (everything is either off or on, zero or one). There is a direct, tight relationship between binary and hexadecimal (the same could be said for octal, which is based on the number 8, but that has fallen into disuse over the decades).

The hex number C4 is the equivalent of the binary number 1100 0100 (the blank space was added for clarity). The reason? Just like in decimal each "place" has a value (the 1's place, the 10's place, the 100's place, the 1000's place...) in binary each position working from the right has a binary value (the 1's place, 2's place, 4, 8, 16, 32, 64, 128...) So with my above example the binary number has a 1 in the 128's place, the 64's place and the 4's place...so it represents our decimal number 196.

In hexadecimal the places are powers of 16 instead of 2 (the 1's place, the 16's place, the 256's place, the 65536's place). So the C4 from the example above is 12 in the 16's place and 4 in the 1's place, or our decimal number 196. That's why I said C4 in hex is the same as 1100 0100 in binary.

Which brings us to the value of hex: if I look at one number that's C4 and another number is C0, I see that the difference is that the C0 binary is 1100 0000 and so the 3rd position from the right is different (zero in C0, which in digital computers is "off"). Programmers speak of the "bit being off". Bits are often used to hold truth values, like "this text is bold" or "this file is read-only" or "this customer is a VIP", etc. Note that a single binary digit is called a "bit" and 8 bits are in a "byte". 4 bits are in a hexadecimal digit, because 8 + 4 + 2 + 1 is 15 (the highest you can go in a single hex digit is 15, just like the highest you can go in decimal is 9). Therefore 2 hexadecimal digits are in a byte (2 times 4 bits = 8 bits).

If you were to try to compare the value 192 and 196 and ask yourself which "bit is off" the decimal values obscure the question. But comparing C0 to C4 it becomes more obvious (although it takes a while working with hex for things to become obvious, I grant you).

This is why jdunlap said the highest value in a single hex "byte" is FF or decimal 255, because all the bits are turned on (1111 1111) because 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 is 255. Larger numbers in hex just get longer (like 7E4D). Don't forget that when adding in hex you "carry" 16's, not 10's. So 18 plus C9 is E1 (8 + 9 is 17, put down the 1 carry the 16 as 1, 1 plus C is D plus the 1 carry is E).

Final points (I promise): the sentence jdunlap showed is based on a system called ASCII where hex 41 is a capital A, 42 is capital B, down to hex 5A is capital Z. As was said, 20 is a space, and the small letters are the sum of space and the capitals (that's why 68 is small h whereas 54 is capital T).

Even if this is 10 times more than the OP wanted to know, it doesn't hurt to post in case someone else might be interested in knowing (at least, I hope you agree).
 
Upvote 0

Word of Peace

Evangelical Quaker, YEC
Dec 27, 2003
1,259
35
✟24,090.00
Faith
Christian
Marital Status
Single
Politics
US-Libertarian
WeakButHopeful said:
I hope jdunlap won't mind me adding a few things to his good explanation and cool example.
Not at all. :)

WeakButHopeful said:
First, there's a typo in his post (at least at the moment I type this): "based on the number 18" should have been "based on the number 16".
:blush: Oops. I'll fix it.

(BTW, for the OP: it's 16 because that's twice the number of bits in a byte.)
 
Upvote 0

seebs

God Made Me A Skeptic
Apr 9, 2002
31,917
1,530
20
Saint Paul, MN
Visit site
✟70,235.00
Faith
Seeker
Marital Status
Married
Politics
US-Republican
jdunlap said:
(BTW, for the OP: it's 16 because that's twice the number of bits in a byte.)

Er.

No.

It's 16 because that's what "hexadecimal" means. In fact, the reason hexadecimal is so useful is that 16 is 2^4, and 4 is *HALF* the number of bits in a byte. So, an 8-bit value can be represented exactly as two hexadecimal digits.

But it's 2^N that makes it 16, not N*2, and N is actually N/2. :)
 
Upvote 0

Word of Peace

Evangelical Quaker, YEC
Dec 27, 2003
1,259
35
✟24,090.00
Faith
Christian
Marital Status
Single
Politics
US-Libertarian
seebs said:
Er. No.

It's 16 because that's what "hexadecimal" means. In fact, the reason hexadecimal is so useful is that 16 is 2^4, and 4 is *HALF* the number of bits in a byte. So, an 8-bit value can be represented exactly as two hexadecimal digits.
The latter part is what I was trying to say. I didn't at all mean that it was called hexadecimal because it's twice the size of a byte- only that it's used widely in the world of computers because of the number of digits it has. ;)
 
Upvote 0

pgp_protector

Noted strange person
Dec 17, 2003
51,893
17,793
57
Earth For Now
Visit site
✟460,400.00
Gender
Male
Faith
Christian
Marital Status
Widowed
Politics
US-Others
I thought a Bit was either a 1 or a 0, a Nibble was 4 bits, a Byte was 2 nibbles, or 8 bits, and a word was 2 bytes.


There are only 10 type of people in the world
Ones that understand binary
Ones that dont.
 
Upvote 0

Word of Peace

Evangelical Quaker, YEC
Dec 27, 2003
1,259
35
✟24,090.00
Faith
Christian
Marital Status
Single
Politics
US-Libertarian
pgp_protector said:
I thought a Bit was either a 1 or a 0, a Nibble was 4 bits, a Byte was 2 nibbles, or 8 bits, and a word was 2 bytes.
Correct (altho a nibble isn't an official standard :) ), except that a Word being 2 bytes only applies to 32-bit processors.


pgp_protector said:
There are only 10 type of people in the world
Ones that understand binary
Ones that dont.
Classic! :D
 
Upvote 0

Ormo

Pan loaf
Jan 16, 2004
96
2
43
Belfast, NI
Visit site
✟22,728.00
Faith
Christian
To carry on the tangent ;)..

jdunlap said:
Correct (altho a nibble isn't an official standard :) ), except that a Word being 2 bytes only applies to 32-bit processors.

A 32 bit processor has a 4-byte word (4x8=32). A 16-bit processor has a 2-byte word (2x8=16).

The word is used to define the number of bits that the CPU can process in one operation (the size of the Current Instruction Register and of the data bus for all of us low level nerds ;)).
Technically a 32-bit processor should have a word-length of 32 bits. But in the development of the CPU sometimes the data bus size fell behind the CIR size and so you may have found a CPU claiming 32bits when in fact the data bus was only 16 and had to shift the next instruction to be executed into the CIR in two goes.


Now, in respect to the OP

Hexing is a form of cracking. It is when a programmer takes a fully compiled binary executable or library and modifies the machine code to change the functionality of the program. The reason it is called hexing is because the programmer uses a hexadecimal editor to modify the binary code as it is easier to do (for the reasons outlined at length in previous posts).

Its often used to illegally patch programs to avoid 30-day limits on trial software or to unlock features disabled on trial software thus effectively gaining the software for free.
It is also sometimes used to modify software to unlock hidden features that the developers had created but left unused in the final release or to create/enable cheating in computer games.
 
Upvote 0