Site BLOG PAGE🔎 SEARCH  Ξ INDEX  MAIN MENU  UP ONE LEVEL
 OJB's Web Site. Version 2.1. Blog Page.You are here: entry2290 blog owen2 
Blog

Add a Comment   Up to OJB's Blog List

About Your Computer 2

Entry 2290, on 2023-09-04 at 21:21:52 (Rating 1, Computers)

Well, having achieved some success with my previous "About Your Computer 1" post (that is, I know of at least 2 people who read it - outstanding) I thought I should maybe do a second. Last time I covered wireless communications technologies, which isn't really the most logical place to start, so this time I will start with one of the more fundamental components in a computer.

Again, you don't really need to know this stuff to successfully use a computer as a normal user, but it might be useful in understanding what to buy when choosing a new machine, or in discussing problems with a technician, or just for general knowledge.

I guess you could say computers do 4 things: they store stuff, the manipulate stuff, they display stuff, and they gather new stuff. Stuff in this case is data, which might be numbers (in a spreadsheet, for example), or words (in a word processor), or sounds (like MP3 music), or graphics (like JPEG photos), or any number of other things.

There's no real difference to the computer between these types; to it they are just a long sequence of on and off signals (or zeroes and ones if you want to be a bit more abstract). We view these types as different because we manipulate and display them differently. So an MP3 is usually played through the speaker and a JPEG displayed on the screen, but the computer could just as easily to that the other way around: it just wouldn't produce anything very meaningful.

So let's go through those functions. In this post I will cover storage.

When you save the latest chapter of your great novel you are putting it into permanent (we hope) storage. Once it is put there, it should stay there even when the computer is powered off. The most common form of storage today is the solid state drive (SSD). These are little circuit boards (sometimes in a case) which contain many "cells" which can hold a zero or a one as an electric charge. Your file is pushed into these cells and can be pulled back out again later when you need it next.

Older computers, and some current designs, use a hard disk (HD) instead. These also store those zeros and ones, but as little magnetic patches on a spinning disk. There are several very precise moving parts in this system (unlike SSDs, which are completely electronic and have no moving parts) so there are many more things that can go wrong.

Also, the speed the data can be written to and read from the storage is important, and waiting for disks to spin to a location, and for the "head" which reads the information to move, slows down hard disks. When you open a file, the small (hopefully) delay is the time it takes for the data to be transferred into "working memory" (see later) from your storage device. The same applies for the time it takes your computer to boot (the operating system is loaded from storage into memory) or to start a program (the program code is being transferred).

Move from a computer with an HD to one with an SSD and you will usually see a huge improvement in how long these operations take. Additionally, SSDs use less power, generate less heat, make no noise, and are smaller, so you might be wondering why we would use a hard disk at all. Well, it's mainly about price. The cost for a certain amount of storage on an SSD is usually significantly more than the same size hard disk. Also, some people prefer HDs for long term storage and claim they have better longevity, although that is disputed.

I should expand on the idea of capacity here. As I write this post, most SSDs are measured in hundreds of gigabytes, and hard disks in terabytes.

Maybe a short explanation is necessary. A byte is a basic until of data on computers. It corresponds to 8 bits. Remember a bit (binary digit) is just an on/off switch, and is really the only thing computers know about. But you can only store a value of 0 or 1 in a bit (it's on or off) which isn't useful in almost every case.

By putting several bits together we can store more. With two bits we can store 4 different values. If you imagine "off" is shown as 0 and "on" as 1, then a single bit can (obviously) be 0 or 1, but two bits could be 00, 01, 10, or 11, which gives us 4 values. Three bits gives us 8: 000, 001, 010, 011, 100, 101, 110, and 111, that could be a number from 0 to 7, or the first 7 letters of the alphabet. Going further, it was found that 8 bits was a convenient (although basically arbitrary) bigger unit, and can store a number between 0 and 255, or any letter in the alphabet, plus digits, punctuations, etc. I won't list all 256 of them here, but they go 00000000, 00000001, 00000010, ... 11111110, 11111111.

By the way, I can work in binary and convert between "bases" (base 2 is binary, which computers use, base 10 is the one we use in everyday life) quite well without a calculator. It's just one of those superpowers programmers have!

Bigger numbers can be created with several bytes, so 2 bytes (16 bits) can store a number between 0 and 65535, or from -32768 to +32767, or all the letters in a much bigger alphabet (like the Roman, Greek, and Chinese alphabets combined).

If you need numbers with decimals, like 2.5 or 3.14159 you can combine bytes in more complex ways: usually with one part indicating the digits, like 314159 and a second part indicating the power of 10 to multiply or divide by to get the decimal place, like -5 in this case. If this is getting too complex, don't worry too much, just be broadly aware of what's happening behind the scenes.

Bytes can be combined in other ways to make special data too. To create a colour - for a single dot on a photo for example; what we call a picture element or "pixel" - we take 3 bytes to represent the amount of red, green, and blue light to mix to get the colour we want. So pure red would be 11111111, 00000000, 00000000, or 255,0,0 (maximum red, no green, no blue). Mixing red, green, and blue light is the standard way to make colours on visual devices like TVs and computer screens, but here are others as well, which I won't confuse you any further about!

By the way, you might have noticed that the number 11111111 and 255 are the same. The ones are that number in binary (numbers just made from zeros and one, or offs and ons; the natural way computers store numbers), and 255 is the same number in base 10: instead of using just 0 and 1, we can use 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Using base 10 for our normal, everyday numbers is completely arbitrary, basically its because we have 10 fingers. The number ten has no special meaning at all.

After that interlude explaining some theory, let's get back to storage. We know what a byte is now: it's just a set of 8 zeros and ones, representing a single letter in the alphabet (let's assume it uses the old school ASCII code, not Unicode) or a small number up to 255, or part of a colour, or part of some other larger object. The prefixes I used there were giga and tera. These are just standard prefixes, like kilo which means a thousand times the unit, so for example a kilogram is 1000 grams.

For storage, we typically use giga, meaning a billion, and tera, meaning a trillion. So a 500GB (gigabyte) drive can store 500 billion letters, like A, B, C, or punctuation like quote, comma, etc. That is quite a lot. A typical book contains less than a million characters (one megabyte) meaning you could store over 500,000 typical books on a 500G SSD or HD.

Note that pictures, sound, and especially video use a lot more space than simple text. A typical JPEG photo needs about 5MB (100,000 would fit on that disk). A typical MP3 song is similar, but a movie can easily take 1GB meaning you could "only" store 500 of them. Of course, you can use many disks, and they are available in much bigger capacities than 500GB, but that gets more expensive.

There is one big problem with high capacity, modern disks. They are very reliable, but nothing is completely immune to failure. Because the disks are so big, if one does fail, you lose a lot of stuff: documents, photos, music, everything! I have seen many very upset people with failed disks, which I have been able to fix in almost every case, but sometimes the data really is gone forever.

Note that even though SSDs are less likely to fail than HDs, when they do fail it is usually far more catastrophic. An HD will typically get really slow, start making weird noises, or display an error message before failing, but an SSD will more likely just die one day with no warning!

So, please do backups! A backup is just a second copy of all your data. It could be onto a second SSD or HD, or into the cloud. If your main disk fails you would have to be very unlucky if your backup disk just chose to fail at exactly the same time, so you can get a new main disk (or a new computer) and restore all your stuff from the backup disk.

The more paranoid amongst us - which tend to also be the more knowledgeable, like myself - keep many backups. I backup onto one encrypted disk at home, and another at work, as well as having most of my stuff in Apple's cloud service: iCloud. Additionally I use two different backup programs: Time Machine and Carbon Copy Cloner, just in case one has an obscure bug. Too much? Who knows, but I've never lost my data!

Note that I use encryption for my backups. Don't foget that (typically) all your files are in your backup. If someone steals your backup disk, all they need to do is plug it into another computer to see all your stuff. Encrypt it, and they can't do that. All of this is built into Macs, and PCs as well, I think (I'm a Mac person).

Just before I finish, I need to explain two words I used above, relevant to this. I talked about "working memory". This is just random access memory (RAM) which is where the information currently being worked on is stored. The computer can't work directly on your files on HD or SSD storage, so they are loaded into memory first. This memory only works while the computer is on, and tends to be much smaller than storage, which is why we need both.

I also mentioned "cloud storage". This is just storing data on someone else's storage system and accessing it across the internet. Cloud storage systems include DropBox, OneDrive, Google Drive, iCloud, and many more. Note that ultimately your data is still being stored on someone else's storage device, but these are very fast and reliable, and probably extend to petabytes rather than just gigabytes or terabytes. Generally, you can trust these systems, because they are encrypted and fully backed up, or use redundant systems (let's not go there just now).

So that is a brief summary of computer storage. This is just the very tip of the iceberg, but I only wanted to handle the basics here, and not get too technical. Don't worry if you didn't memorise all the stuff about binary and bytes and tera and giga, just being broadly aware of these concepts is fine!


There are no comments for this entry.


You can leave comments about this entry using this form.

Enter your name (optional):
Enter your email address (optional):
Enter the number shown here:number
Enter the comment:

To add a comment: enter a name and email (optional), type the number shown, enter a comment, click Add.
Note that you can leave the name blank if you want to remain anonymous.
Enter your email address to receive notifications of replies and updates to this entry.
The comment should appear immediately because the authorisation system is currently inactive.

I do podcasts too!. You can listen to my latest podcast, here: OJB's Podcast 2024-08-22 Stirring Up Trouble: Let's just get every view out there and fairly debate them..
 Site ©2024 by OJBRSS FeedWhy Macs are BestMade & Served on Mac 
Site Features: Blog RSS Feeds Podcasts Feedback Log04 Nov 2024. Hits: 46,860,426
Description: Blog PageKeywords: BlogLoad Timer: 13ms