FSUIPC: Lua Tutorial |
|
Bits & Bytes Remember those 1s and 0s, those are bits. There are 8 bits in each byte. If you calculate the states of 8 bits, you get 256 combinations. Remember 00000000 is a combination too. So the byte is the ROOT of all computing. To make larger memory addresses, we combine bytes together. Here's where thing get interesting. One byte (8 bits), is one byte. (B) Two bytes (16 bits) is called a Word (W). Why? I don't know. Because someone smarter than me said so and other people agreed. Anyway... Three bytes... Wait, why don't we use three bytes? Four bytes(32 bits) is called a Double Word. (DW) Then we look at if the values in the bytes are Signed or Unsigned. (meaning positive and negative numbers) Now we have... Unsigned Byte (UB), Unsigned Word (UW) and Unsigned Double Word (UD) Don't forget... Signed Byte (SB), Signed Word (SW) and Signed Double Word (SD). But wait! There's more. Some people need even more room and bigger numbers. Or, to say, NASA needs numbers that have very large decimal points. 3.1416 is not as accurate as 3.14159265358979323846264338327950288419716939937510 58209749445923078164062862089986280348253421170679821480865132823066470938446095 50582231725359408128481117450284102701938521105559644622948954930381964428810975 66593344612847564823378678316527120190914564856692346034861045432664821339360726 02491412737245870066063155881748815209209628292540917153643678925903600113305305 48820466521384146951941511609433057270365759591953092186117381932611793105118548 07446237996274956735188575272489122793818301194912983367336244065664308602139494 63952247371907021798609437027705392171762931767523846748184676694051320005681271 45263560827785771342757789609173637178721468440901224953430146549585371050792279 68925892354201995611212902196086403441815981362977477130996051870721134999999837 29780499510597317328160963185950244594553469083026425223082533446850352619311881 71010003137838752886587533208381420617177669147303598253490428755468731159562863 88235378759375195778185778053217122680661300192787661119590921642019893809525720 10654858632788659361533818279682303019520353018529689957736225994138912497217752 834791315155748572424541506959... To handle numbers that big, or small, we have... Signed 64bit value (DD) I don't know why it's not called a quadruple word, or even a double-double word. Floating Point(32bit) (FLT) Double Floating Point(64bit) (DBL) Then because we like to read what computer are saying to us, we have Strings (STR). Strings are a "string" of characters. Strings vary in size and usually the size is preset. So to review... UB
unsigned 8bit byte |
|
|