< Day Day Up > |
In this chapter
How do computers measure information? By the byte. It's the basic unit of measurement for all parts of the computer that involve the storage or management of information (RAM, storage, ROM). Here are a few examples:
Understanding bytes and the other measurements derived from bytes is essential to choosing the correct sizes for RAM configurations, storage media, and much more. Some of the A+ Certification test questions typically deal with RAM and hard disk size measurements, as will your day-to-day work.
So, what's a byte? If you are storing text-only information in the computer, each character of that text (including spaces and punctuation marks) equals a byte. Thus, to calculate the number of bytes in the following sentence , count the letters , numbers , spaces, and punctuation marks: "This book is written by Mark Edward Soper." 12345678901234567890123456789012345678901234 10 20 30 40 From this scale, you can see that the sentence uses 44 bytes. You can prove this to yourself by starting up Windows Notepad (or using MS-DOS's EDIT) and entering the text just as you see it printed here. Save the text as EXAMPLE.TXT and view the directory information (MS-DOS) or the File properties. You'll see that the text is exactly 44 bytes. Do most computer programs store just the text when you write something? To find out, start up a word-processing program, such as Windows WordPad or Microsoft Word. Enter the same sentence again, and save it as EXAMPLE.If you use WordPad, save the file as a Rich Text Format (.RTF) file and as a Microsoft Word (.DOC) file. Depending upon the exact version of WordPad or Microsoft Word you use, the file takes up much more space. For example, WordPad for Windows XP saves text as an RTF file, using 243 bytes to store the file. The same sentence takes 19,968 bytes when saved as a .DOC file by Microsoft Word XP! What happened ? The next section explains this apparent oddity. |
< Day Day Up > |