Welcome to Introduction to programming. In this section we're going to have a short introduction, we will discuss hardware and software and we will talk about how computers store data. You must have hardware and software in order for your PC to work properly. hardware is the physical devices that make up a computer. The typical major components of hardware are the central processing unit, main memory, secondary storage devices, and input and output devices. The central processing unit or CPU is the part of the computer that actually runs the programs.
Sometimes you may actually hear it being referred to as the brain of the computer. Micro processors are CPUs that are located on small chips. Main Memory is the memory that the computer uses to run Apple occations is also known as random access memory. Now the CPU will quickly access the data that is located in that random access memory. Random Access Memory is also a volatile memory, because it's used for temporary storage. So what that really means is, it'll be running while you were running the program.
But when everything is shut off, you're going to lose all of that memory. And that's why if the PC or the power accidentally goes off, you lose everything that you've been typing on that paper. secondary storage devices are a little bit different than main memory and that secondary storage can hold data for very long periods of time. So examples of that would be the hard disk drives that are in your computer. The hard disk drive that's typically in there may work magnetically and have a spinning circular disk inside of it. The solid state drive is very similar, but it is faster than a disk drive and there's no moving parts and it stores data in a solid Solid State memory.
It's also a little bit more expensive of a drive than standard disk drive. Another example of a secondary storage device might be your flash memory or an optical device. A flash memory is portable, it's very small, you can put it on your key chain or put it in your pocket. Most of you should be familiar with flash memory. optical device is like your CD ROM or a DVD and data is encoded on that optically. Another device on your computer input devices.
Now input is any kind of data that computer collects from users or other devices. So really, what that means is anything that I put into the computer as a user is an input. So if I use a camera, and I am recording a video or something like that, then I am creating input if I am using a mouse to click on things to go from one web page To another or to do any type of productive work, then I am putting an input if I scan something into the computer, then that's input as well. The keyboard is also another example of an input device. Right now I'm creating input because I'm recording my voice. The technical definition for an output device is data produced by the computer for users or devices.
But as a user from that perspective, is anything that you see on a screen, anything that you print out on your printer, anything that is in readable format that you can see is an output device. So let's talk about software. Everything on the computer is controlled by software to software examples are application software, and system software. application software is any program that any person can use. on pretty much any computer. So an example of that would be if you're browsing the internet, if you're checking your email, playing games, which, you know, being geeks, now we don't play games, do we?
Writing a letter and word processing or even creating a spreadsheet? system software is a little bit different than application software, and that we don't necessarily as a user, really see all the system software's. I mean, for example, operating system is a good example of a system software. We see it we interact with it, but we don't really think that much about the operating system. utility programs such as a Printer Maintenance software might be another example. Those we do see we play with some people may not realize so much that they're there, but sometimes we need to use it to clean the ink, you know, run the maintenance program on an inkjet printer.
For example on clean up all the inks on the nozzles. software development tools are another example of system software. And those types of tools are used to write programs, which is what we're going to be doing one of these days. When learning to program, it's really important to learn about how computers store data. Now this is something that's going to take a little bit of time to get down, it's going to take some practice to get down. And you may not even really fully understand how computers store data until you've played with it quite a bit.
But the computer is definitely going to only read data that is stored in zeros and ones. So of course, as a user, we don't see the zeros and ones but the computer translates it so that it can understand all the zeros and ones so it can process instructions. So a byte is a size of memory stores just big enough to store a letter or a small number. Now this type of information will be important when you're writing prose programs because you'll need to know what type of data to tell your program compiler so that it knows exactly what to process and also so that you know how much space you're taking up. So the last time we talked about how much space and byte takes up, a byte is actually eight bits as well. And a bit is an electrical component that can hold a positive or negative charge like an on or off switch.
It's kind of how the computer translates everything and puts it into binary and then it reads whether or not is a zero or one based on whether or not an electric current is present. The on and off pattern of bits represent the data that the computer is going to process. So remember, a bit represents two values, zero, or one. computers can use the binary number system and bite size limits are Zero and 255. So if a bite is all zero, then that means all bets are off. If it's 255, then all bets are on.
So let's say one more time data stored in the computer must be stored in binary characters are converted to numeric code and the numeric code is also stored in binary. Now there are two types of numeric codes there is the ASCII and Unicode. ASCII is limited to 128 characters, then Unicode is actually supports multiple languages. Advanced numbers, storage deals with negative numbers and real numbers. So negative numbers are coded using a two's complement and real numbers aren't coded using floating point notation. Now we'll talk about how to tell the compiler what you're going to use whether you're having floating point notation, two's complement, or however you're going to do anything later on in the program.
In the class, but it's just important to know that again, telling the compiler what type of number that you're using is extremely important when you're designating it because of the space that it takes. And because it knows how to process that particular type of data. Now you finished lesson one. Let's move on to lesson two and let's learn how a program works.