Program is a bunch of instructions that the computer tells it to carry out.
You can think of it as a recipe. A recipe is just a list of instructions.
You can think of a program as an abstract concept.
Programmers write simple programs with C++ or Java for instance.
Then the program is executed.
Software is a collection of programs designed for a specific task.
Example
A calculator is software.
But the instructions written is a program.
Adding two numbers together on the calculator is a program since it’s a set of functions carried out.
You are going to update your computer system clock. It then tells the hardware components what to do and how to interact with the program or set of programs that reside in main memory.
Lets start with a binary number
1110010111010
As with binary numbers you start from right to left.
Starting from right you divide the binary numbers into nibbles.
1  1 1 0 0  1 0 1 1  1 0 1 0
1 8 4 0 0 8 0 2 1 8 0 2 0
Remember the Rule of thumb!
For every number you do not use you put a 0(off).
1  0 + 0 + 4 + 8  1 + 2 + 0 + 8  0 + 2 + 0 + 8
1  12  11  10
Looking at the hex chart you can now substitute the numbers for the hex
1  C  B  A
Lets star with a hex number
F47B
Using the hex chart convert the hex to decimal numbers.
F  4  7  B
15 4 7 11
Now convert each decimal number into binary
1111  0100  0111  1011
8 + 4 + 2 + 1  0 + 4 + 0 + 0  0 + 4 + 2 + 1  8 + 0 + 2 + 1
15 4 7  11
The answer is
11110100011111011
Example 1:
Lets start with a decimal number
33
Since you know that Octal is in the base 8 number system.
You divide 33 / 8
33 / 8 = 4
remainder 1 – Since you know 8 goes into 33 4 times and there is the number 1 left over
Then you take the number you got and divide that by 8
4 / 8 = 0
remainder none – Since you know 8 goes into 4 0 times and there for the remainder is none.
So the answer is 41
Example 2:
Lets start with another decimal number
98
You divide 98 / 8
98 / 8 = 12
Remainder 2 – Since you know 8 goes into 98 12 times and there is the number 2 left over
Then you take the number you got and divide that by 8
12 / 8 = 1
Remainder 4 – Since you know 8 goes into 12 1 time and there is the number 4 left over
Then you take the number you got and divide that by 8
1 / 8 = 0
Remainder 1 – Since you know 8 goes into 1 0 times and there is the number 1 left over
You now take all the remainders you got and put them together. Last to first.
So the answer is 142
Example 1:
As you learned above octal is a base 8 number system,
0 1 2 3 4 5 6 7
Lets start with an octal number
238
2  3  8
Each digit is multiplied by 8 by its power
2  1  0
2 × 8² + 3 × 8¹ + 8 × 8⁰ – You now solve this with PEMDAS
P(parenthesis)E(exponents)M(multiplication)D(division) A(addition)S(subtraction)
You solve the exponents then the multiplication and then addition
2 × 64 + 3 × 8 + 8
128 + 24 + 8 = 152
Example 2:
Lets start with another octal number
7050
7  0  5  0
Each digit is multiplied by 8 by its power
3  2  1  0
7 × 8³ + 0 × 8² + 5 × 8¹ + 0 × 8⁰
7 × 512 + 0 × 64 + 5 × 8 + 0
3584 + 0 + 40 + 0 = 3624
If you read my blog post on Inside the four stages(cycles) of your computer then you learned what RAM is.
If you remember, RAM is short term memory, that holds and stores data(instruction) that is currently in use.
DRAM and Static random access are the two main parts of RAM.
DRAM is random access memory made up of a transistor and capacitor. Together the transistor and the capacitor team up to create memory cells.
Every memory cell in a DRAM chip holds a bit 1(on) and 0(off).
Transistor
The transistor is the switch which reads and controls the current flow of the capacitor.
If the current can flow through the transistor then it will hold the charge of 1(on). But if the current can’t flow through it holds the charge of 0(off).
Capacitor
The capacitor holds the charge of the transistor and reads the transistor. However within time the charges of the memory cells leak away.
You can compare a bucket of electrons to a capacitor.
Inside of a bucket are electrons.
If the electrons store and charges a 1 in the memory cell, the bucket fills with electrons.
If the electrons store a 0, the bucket leaks and gets emptied. You can say bye bye electrons.
How to fix it and make it work?
The CPU or memory controller needs to come and say hey we are going to recharge all the capacitors holding a 1 before they are let go.
The Memory controller decides to read the memory it gets and then recharges it.
Since it has to be dynamically refreshed all the time it becomes slow.
Static random access is memory that never needs to be refreshed unlike DRAM.
Static random access holds a flipflop circuit.
A flipflop is a circuit that has two stable states.
On and off.
The circuit remains in one of the states until a signal causes it to switch.
Think:
You can think of it this way. Your light switch has circuitry. There is on and off.
You signal the light to turn it on if you want light. But what if you don’t want light. You signal the light to turn off.
Same as a flipflop.
A flipflop circuit does not use a capacitor so it does not need to be recharged. Which makes static random access much faster.
However since static random access is using less memory per chip it makes it more expensive then DRAM.
fast contrast to follow up on uneasiness (7)
This is a continuation of the learning binary series. Be sure to read learning binary before reading this post.
Lets start with basic decimal addition.
The basic values column
1000  100  10  1
Example
1  1  
1  5  9  5  
+  3  5  6  4  
_  _  _  _  
5  1  5  9 
We take the first digit and carry that. While the second digit remains below.
The digit you carried is added to the number.
5 + 4 = 9 > 9 Is less then 10 so we don’t carry over.
9 + 5 = 15 > 15 is higher then 10. We need to carry a 1 over into the 100’s column.
1 + 5 + 5 = 11 > 11 is higher then 10. We need to carry a 1 over into the 1000’s column.
1 + 1 + 3 = 5 > 5 is less then 10 so we don’t carry over.
Answer 5159
Onto binary addition
Binary addition is the same concept. Except for your using binary numbers 1 and 0.
0 + 0 = 0
1 + 0 = 1
10 + 0 = 10
1 + 1 = 10 > 1 + 1 = 2 > 10 = 2 in binary
10 + 1 = 11
Example
1  1  1  
1  0  1  1  
+  1  0  1  1  
_  _  _  _  _  
1  0  1  1  0 
1 + 1 = 10 > We carry the 1
1 + 1 + 1 = 10 + 1 = 11 > We carry the 1
1 + 0 = 1
1 + 1 = 10 > Since there is no more columns to carry. We put 10.
1011 = 11
1011 = 11
11 + 11 = 22
Answer 10110 = 22
Lets start with basic decimal subtraction
Example
3  4  16  
3  

4  
−  2  3  4  9  0  
_  _  _  _  _  _  
1  0  0  7  4 
4 – 0 = 4
Borrow 1 to make 16 – 9 = 7
Borrow to make 4 – 4 = 0
Borrow to make 3 – 3 = 0
3 – 2 = 1
Answer 10074
Onto binary subtraction
0 – 0 = 0
1 – 0 = 1
1 – 1 = 0
10 – 1 = 1
0  1  10  10  
1  
−  1  1  1  0  
_  _  _  _  _  _  
0  0  1  1  1 
1 – 0 = 1
Borrow 1 to make 10 – 1 = 1
Borrow 1 to make 10 – 1 = 1
Borrow 1 to make 1 – 1 = 0
Borrow 0 to make 0
10101 = 21
1110 = 14
21 – 14 = 7
Answer 111 = 7
I hope you enjoy my tutorial on how to subtract and add binary numbers. The next guide in this series will be how to multiply and divide binary numbers.
]]>A computer is a electronic machine that takes a instruction and then executes it.
Think: Just as your boss would give you a instruction.
For example: He would ask you to file some paperwork.
Then you would execute that instruction by filing it in the filing cabinets.
A computer accepts 1.)input 2.)processing 3.)Storage and 4.)Output
You need to wash your clothes so you use a washer and dryer.
Now that you know the basic rundown of input, processing, storage and output lets dive more into them.
Lets compare the ENIAC to a computer today to get a sense of input in computers.
Imagine a computer that is not as portable and small today.
Instead imagine a monstrous computer that weighed over 30 metric tons and was around 680 square feet. Which also contained 17.468 vacuum tubes, 70,000 resistors, and 10,000 capacitors. You can imagine it as taking manpower to operate it.
That is the computer ENIAC(Electronic Numerical Integrator And Computer). The first general computer that was invented in 1945. It was equivalent of a adding machine and storage unit.
It used twenty accumulators. For each accumulator it stored a 10digit decimal number. Which you know from this post is not applicable today.
Learn what accumulators are from this site.
But now you have input devices that are easy to enter data into the computer.
There are two types of input devices Manual input devices: and Direct data entry.
As you read above Processing is the computer thinking. The CPU is designed to process the instructions on a computer.
CPU is an integrated circuit that is the brain and heart of your computer.
Your computer can not beat without it. Since it contains all the circuitry that the computers handles all the instructions with.
Think: You have a heart. But what if you did not have a heart? Then you would not be able to function and not live to see another day. Same as a CPU. It is the heart of the computer. Without it the computer would not know what to do.
The clock is the timing device of the CPU(microprocessor).
The processor executes one thing at a time. Its the time given by a clock just like an oscillator.
Short definition of oscillator
An oscillator is a periodic fluctuation between two things based on changes in energy.
An oscillator runs 0,1,0,1,0.
Each time the clock changes the processor executes one instruction.
Rule of thumb: Faster clock rate = faster CPU
As you read above storage is information(data) that is stored. Without storage your data would not be saved.
A computer accepts Primary storage and Secondary storage as the two main types of storage.
You are at your local library looking for a book on one of the shelves.
You see a book you want. So you grab a book off of the shelf which is Secondary storage . The books in secondary storage that are not being used are filed away and stored on the shelves.
You decide to sit down on the libraries couch or table to read the book. You are now in Primary storage
Primary storage is designed to hold data(instructions) on a short term(temporary) basis. It connects to the computer processor for easy access.
It’s also Volatile meaning that since the memory is held on a temporary basis. It gets erased when the power is turned off.
Human brains are complex. They have a conscious and sub conscious.
In your conscious you are accessing information(data) in the part of buy CBD products brain right now. While in your sub conscious mind you are accessing information(data) that happened a while ago.
RAM is short term memory. It holds and stores data(instruction) that currently are in use in primary storage for fast retrieval. When the computer is on RAM gets work done but when it’s off it loses the data.
The processor(conscious) has to go to the hard disk(sub conscious) to to receive more memory. If you got more RAM then it would reduce the number of times the computer processor has to read the data from the hard disk which makes it more faster.
ROM can be read only. Hence read only in Read only memory.
Even when the computer is powered off ROM remains and can not be removed.
Secondary storage holds data that is currently not being processed. The data is filed away waiting to be used.
It’s nonVolatile meaning that the data is still there when the power is turned off.
When a program runs or a file is opened, the computer copies the data from the Hard drive to RAM which gets stored in your conscious mind. When you are finished with the program the data is then copied back into the hard drive where it remains in the sub conscious mind until it needs to be accessed again.
Rule of thumb: Faster hard drive = faster computer
As you read above Output is the information(data) that is presented in a readable format.
You are already using output devices in your daily life.
Think: of a monitor. Without the monitor there would be no data(information) outputted.
I hope you enjoyed my introduction on the four stages(cycles) of your computer. I just covered the surface of these four subjects. There is so much more you can learn. Go out and explore more about the four stages(cycles) that make up your computer.
]]>To understand bits is to understand binary. They coincide.
Bits is the abbreviation for binary digits.
Binary Digits
Binary represents two numbers since its a base 2 numbering system which uses electrical circuits. It uses the numbers 1’s and 0’s.
Each bit represents a single switch in a circuit.
Think of a light switch. There is on and off.
Same concept in binary.
1 would be on and 0 would be off.
If the gate is open (1) electricity can flow through.
If its off (0) then electricity is blocked.
Each bit is a binary digit. But eight bits equal a byte.
Half of a byte is a nibble which is four bits.
Analogy:
You have eight cookies in front of you. So you have a byte. But if you were hungry and ate four cookies. Then you would have nibble.
The decimal number systems use the digits 0,1,2,3,4,5,6,7,8,9.
Ten digits(numbers) for ten fingers and ten toes.
Computer does not have toes or fingers.
As you read above it has electronic circuits. On and off.
If you used the decimal number system there would have to be ten states instead of two. Which means its more complicated and less reliable to represent the numbers. Computers now don’t have the technology to create more then two states since the switches in the circuits are changing constantly. It is logical to have only two states because with more states the system would need to constantly convert between them.
Think of this: Ten light switches in your room with the option on and off. Now that would make for a hard time. It would make more sense to have two states. Just on and off. That would be less of a hassle.
Remember the saying: Less is more
As you have learned binary is in the base of two. So you multiple two to each number.
1×2=2 2×2=4 4×2=8 8×2=16
Your getting the picture. You start from right to left.
128 64 32 16 8 4 2 1
For each number you use you put a 1(on). For a number you don’t use you put a 0(off).
Example: 13 in binary
1 1 0 1 – Would be 13 in binary.
8 4 0 1
1 + 0 + 4 + 8 = 13
For the number I did not used I placed a 0.
Another example: 21 in binary
1 0 1 0 1
16 8 4 2 1
1 + 4 + 16 = 21
Now you should you know what the binary quote means above.
“There are only 10 types of people in the world, those who know binary and those who don’t”
10 = 2 in binary
2 + 0 = 2
As you can understand for the quote, it’s saying…
“There are only 2 types of people in the world, those who know binary and those who don’t”
Soon there will be coming a lesson on how to add, subtract, multiply, and divide binary numbers. Also how to convert binary to hex and hex to binary.
]]>I got the inspiration for this blog from this site learningnerd.com
Transcript
I want to learn everything! From animation, programming, computers, music composition, too even the arts. Thats a huge goal I know!
But I want to share the power of knowledge.
Inspirational quotes
“If you can’t explain it simply, you don’t understand it well enough.” – Albert Einstein
“Share your knowledge. It’s a way to achieve immortality. Dalai Lama.” – Dalai Lama
“The best advice I ever got was that knowledge is power and to keep reading.” – David Bailey
]]>