 A program is stored in RAM and run by a CPU. The CPU is like a factory and RAM is like the storage building connected to it. The storage building has numbered containers all the same size and all in order starting at zero. The factory also has some containers each used for a special purpose. A bus can travel between the buildings and move the contents of any container into any other. Inside the factory there is a control room where the boss works and a machine room where all the work gets done. As the factory owner you tell the boss what to do. You load the storage building with instructions one after the other, some with raw materials nearby. The boss cycles through the same six step checklist for every instruction and uses the clock to stay on pace. The first item on the checklist says to make a note of the number that is in the next container and then to radio the bus driver to fetch that instruction from storage. The second item on the boss's checklist gives the bus driver time to fetch that instruction and the boss a chance to make a note of it. The third item on the checklist says to add one to the number that's inside the next container so the boss doesn't have to remember which container has the next instruction when this one is over. The fourth, fifth and sixth items on the checklist are determined by the instruction itself. In this case the fourth and fifth checklist items tell the boss to send the bus back out to the container that is next, container number one in this case, and move the raw materials inside into a container on the factory floor. The sixth item on the checklist in this case tells the boss to increment the number in the next container one more time since this instruction used an extra container. Now the first instruction is over and the boss starts the checklist again from the top. The boss makes a note of the number in the next container and then radios the bus driver to fetch that instruction from storage. The boss writes down that instruction and then adds one to the number in the next container. This instruction is like the first and it tells the boss to send the bus back out to the container that is next, container number three in this case, and grab the raw materials from it and move them into another container on the factory floor. The boss again updates the number in the next container adding one to it since this instruction used an extra container and then the cycle starts all over again. The third instruction sends the raw materials that are now on the factory floor to the machine room. To execute this instruction the bus moves the raw material in the first container to the temp container. It then grabs the other raw material and parks next to the machine room. The machinist grabs bits from each raw material and gives them to the compare machine in this case which tells him how their values compare. The machinist then raises a flag over in the control room telling the boss whether the materials have the same value or if one is greater than the other. The flag stays up even after the instruction is over. The instruction cycle starts over and the boss executes the next instruction which says to first check if a particular flag is raised. The boss sees that the flag is raised so the next part of the instruction applies. It says to put a new number in the next container. Normally the boss updates the next container and just adds one to it as necessary. In this case the instruction itself has an extra container with the number to put in that next container instead. The instruction ends and the cycle starts over again, except this time the boss will be executing an out of order instruction. That's how programming works. You write a long list of instructions that can handle any situation that may come up. You also frequently include some instructions to compare data values and then jump to the appropriate set of instructions depending upon what situation the CPU finds itself in. In this case all the data has been predetermined by the programmer, but normally a lot of that data comes from an external source like a user or a network. Find more at InOneLesson.com including a link to this free CPU model that you can program. Although it looks complicated it does exactly what we've just talked about. The RAM on the right is just like a storage building with containers inside. The CPU on the left is like a factory with a control room that fetches and executes instructions from storage and a machine room that processes the data. Look for more videos soon and feel free to leave a comment with your questions or thoughts on this video. Thanks for watching.