Negative 00000000 codes? is has any one tried this? if so can you point me in the correct direction?
lets say you have an address that is 0000000 and you want to go (lets say -1000) is this possible?
99999999 +
88888888 +
77777777 +
66666666 +
55555555 +
44444444 +
33333333 +
22222222 +
11111111 +
00000000
AAAAAAAA -
BBBBBBBB -
CCCCCCCC -
DDDDDDDD -
EEEEEEEE -
FFFFFFFF -
example u want to go 1 byte backward from 00000000.
00000000 - 1 = FFFFFFF1
Quote from: Mathew_Wi on October 24, 2010, 09:28:03 AM
FFFFFFFF = -1 I think.
by FFFFFFFF u will go more than 1 byte backward...
put your bytes in FFFFXXXX.
example, go 1337 bytes backward. FFFF1337
FFFF = backward, 1337 = bytes
for -1000 use this, FFFF1000 (in hex)
Sorry Deathwolf, you're super wrong. -1000 = 0xFFFFFC18 (or 0xF1C8 for a 16-bit signed integer)
http://geckocodes.org/index.php?arsenal=3
Put -1000 into the "Hex - Decimal" box, and then hit the < button.
To understand this, you should google "two's complement notation". That will explain how to represent negative numbers using hex.
why? I said in "HEX"
1000 in hex
-0x1000 = 0xFFFFF000
FFFFFFFF = -1
FFFFFFFE = -2
and so on!!!
The hex <-> decimal converter does the hard work.
Thread solved ;D
Btw. if you search less than 00000000 with geckodotnet, if will never find results.
Because in HEX there is no negative, only if you convert to decimal, right?
LOL ;D much thanks guys..I should have figuerd that out on my own. been working to many hours.
Quote99999999 +
88888888 +
those are both negative values in hexadecimal.
mathematical maximum is 0x7FFFFFFF in hex.
mathematical minimum is 0x80000000 in hex.
When we write programs, we sometimes use integers. These integers can be varying sizes; 8-bit, 16-bit, 32-bit, or even 64-bit. Aside from the size of the integer, there are also two major ways to represent integers; signed and unsigned.
An important thing to remember is that everything in the Wii is just a series of bits. It is how the bits are treated that determines what they mean. The same 32-bit value can be an integer, an ASM instruction, an ASCII character, a float...anyway, an unsigned number will never be treated as negative. Therefore, it can represent values twice as big.
A simple example is the 8-bit value limits. If you treat 8 bits as unsigned, you can represent the values from 0 to 255. That would be 0x00 to 0xFF.
However, if you treat the 8-bit as signed, then the first bit will be used as a sign bit and is no longer available to represent numbers. So the biggest signed 8-bit value is 127 = 0x7F.
Because of the way computers are built, if we interpret negative numbers a certain way, all of the electrical circuits from addition can be re-used. The trick is flip the bits and add 1! There are other tricks, but that one is the simplest (aside from memorization or Windows calculator in scientific mode)
Take 0xFF. When this represents an 8-bit signed value it will be -1. 0xFF = 1111 1111, flip the bits = 0000 0000, add 1 = 0000 0001.
Now try 0xFC. 1111 1100, flip the bits = 0000 0011, add 1 = 0000 0100 = 4. Therefore, 0xFC = -4.
The process also works in reverse. 0x07 = 0000 0111, flip the bits = 1111 1000, add 1 = 1111 1001 = 0xF9 = -7
---
The next important thing to understand is the concept of sign extension. The first bit is the sign bit. With negative numbers, that bit is always set. But what happens when you want to add an 8-bit signed integer to a 16-bit integer? 0x00FC is not a negative 16-bit number! So we extend the sign bit (using extsb or extsh instructions); this makes the 8-bit signed 0xFC into a 16-bit signed 0xFFFC.
hey um where do i find the 0 for the codes also 3,4,5,etc