Memory: Bits and Bytes
To understand how much information can be stored in a le on the NXT brick, it is necessaryto understand some of the nearly universal units of information storage in computer science.
The smallest unit of information is the bit{an entity that can be one of two values{typically
0 or 1. A byte in our context is dened as a collection of 8 bits. The 8 bits per byte
equipment, which one would expect to use the base two multipliers, have instead used the
base ten multipliers to make their hardware look better. For example, when purchasing a
computer a consumer might wonder: Is a gigabyte of RAM 1,024 megabytes, or just 1,000
megabytes? If the latter, then they may have 24 fewer megabytes than they expected. This
abuse of the prexes has led to widespread ambiguity about the precise meaning of the kilo-,
mega-, and giga- prexes.
There are also some loosely held standards for abbreviating collections of bits and bytes.
Typically the word bit is abbreviated with a lowercase 'b', whereas byte is abbreviated with
an uppercase 'B'. The prex abbreviations are typically capitalized, kilo- (K), mega- (M),
and giga- (G). However, it is not uncommon for kilo- to use a lowercase 'k'. A hard disk drive
might be marketed as having a capacity of 130GB (130 gigabytes). An internet connection
might be marketed as being able to deliver 1.5Mbps (1.5 megabits per second, that's just
0.1875 megabytes per second). And, of course, there is still the question of what giga- and
mega- actually mean in these two examples!
The NXT brick has a 32-bit CPU. This means that the CPU can process 32-bits at a time
(4 bytes). There are 64KB of RAM and 256KB(0.25MB) of persistent storage. Compared
to laptop and desktop computers, this is a small amount of memory. Because the tiny NXT
operating system is also stored in the persistent storage, not all of the 256KB is available for
data les. As a result, the programmer must be as ecient as possible so as not to exceed
the available resources.
Returning to the File Management window, click on one of the sound les and then click
the \Info" button. In the text window at the bottom, the size of the le is given in bytes.
Indeed, in the le list, the size of every le is given to the nearest tenth of a kilobyte. It is
possible to delete les by selecting particular les and clicking the \Delete" button. When
trying to free up space, user generated data les, old User Programs (rxe), and Try Me
programs (rtm) are good candidates for deletion. All of these types of les can be replaced
if you have your original programs saved someplace else.

No comments:
Post a Comment