|
|
|
 |

May 8th, 2001, 09:58 PM
|
 |
Major
|
|
Join Date: Dec 2000
Location: Northern Virginia, USA
Posts: 1,048
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Could someone explain:
The reason we're stuck with either 8-bit or 16-bit numbers is that computers typically use either 1 byte or 2 byte registers to store numbers. 1 byte=8 bits, so 2 bytes=16 bits.
And, of course, those registers are independent of the actual programming language, since the higher-level programming language instructions are compiled into a set of machine instructions, which are based on the registers (and a few other things, but that's a different topic entirely).
As for why 1 byte = 8 bits, that's a matter for history buffs (hey, I'm only 31 years old, how should I remember the glory days of computing  ).
__________________
L++ Se+++ GdY $++ Fr C+++ Csc Sf Ai AuO M+ MpTM S Ss RRSHP+ Pw- Fq->Fq+ Nd+++ Rp G++ Mm++ Bb---
|

May 8th, 2001, 10:28 PM
|
Corporal
|
|
Join Date: Feb 2001
Location: Vienna, Vienna, Austria
Posts: 170
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Could someone explain:
Zenbudo:
thanks for your kind words.
I cannot answer if it is very complicated to program multiple sector game areas. But I assume such a system is simpler and more flexible than a "monster" universe with thousands of systems located in one gigantic sector.
Especially because the entire data of the different sectors have not to be in RAM the whole time, (because only one sector is active in RAM at the same time) it could be a resource saving method. On the other hand the universe could be nearly infinite. (depending rather on HD-space than RAM)
bye
Klaus
|

May 8th, 2001, 10:40 PM
|
 |
Major General
|
|
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Re: Could someone explain:
Another reason for octets --
Load/store instructions are often constrained to 1) operate only on data words or double words, and 2) operate only at *word boundaries* -- e.g. for 32-bit words, only at addresses divisible by 4 (bytes). I'm not familiar with x86 machine language, so I can't be sure.
Ditto for arithmetic. ALUs are designed for a given number of bits in their input -- e.g. handling 32-bit numbers, and outputting 32 bits plus various flags that can be set.
So while one *could* use, say, 14-bit foo, there'll need to be instructions converting back and forth between 14-bit and, say, 32-bit, if you want to do arithmetic. Those 14 bits may need to be shifted and zero-padded to fit into a 32-bit word for arithmetic, memory usage... and depending on language support, the programmer may need to explicitly specify the shifts and other bit operations. It's much more convenient normally to rely on "standard" data types.
(Standard in quotes. C, for instance, specifies only minimum ranges and the ordering -- shorts must be at least 16 bits, and no longer than ints, but other than that could pretty be whatever. Endianness is also not specified. Java is more standardized IIRC -- fixed bit lengths, and network-byte order.)
------------------
-- The thing that goes bump in the night
__________________
Are we insane yet? Are we insane yet? Aiiieeeeee...
|

May 8th, 2001, 11:24 PM
|
 |
Captain
|
|
Join Date: Jan 2001
Location: Texas
Posts: 830
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Could someone explain:
Q: If eight bits are a byte, what do you call four bits?
A: A nibble
|

May 9th, 2001, 12:05 AM
|
 |
Colonel
|
|
Join Date: Feb 2001
Location: B.F.E. USA
Posts: 1,500
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Could someone explain:
What is this???? Greek 101?
------------------
mottlee@gte.net
"Kill em all let God sort em out"
__________________
Kill em all let God sort em out
|

May 9th, 2001, 01:06 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: Could someone explain:
No, its CS 251 
__________________
Things you want:
|

May 9th, 2001, 06:08 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
|
|
Re: Could someone explain:
Thank god, I thought it was Basic Cobolt 101 with a bit of C, not C++. I was getting confused. Often happens after:
10 cls
20 print "WTF"
30 input = x
40 print "enter your name"
50 print x
60 Print "you just froze up my pc."
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|