The main purpose of computer science and programming is to solve problems. Problem solving can be defined as the the process of finding solutions to difficult or complex issues.
In computer science, we use algorithms. An algorithm is a sequence of instructions that is used to find a solution. Problem solving is about understanding the problem at hand and figuring out how to translate the problem into a solution suitable for the computer.
Once we understand the problem and devise a plan, we can begin implementing the solution. Implementation involves writing in a language that can be understood by both the computer and the human programmer. Testing is another important part of problem solving that includes verifying that your solution solves the original problem.
There are hundreds of programming languages, each with their pros and cons. Examples of programming languages are Java, Ruby and c++.
IDEs are Integrated Development Environments. They combine various useful programming tools into one software program. Examples of IDEs are BlueJ, Eclipse and Oracle Developer Studio.
There are four programming language levels:
All programs must be translated to a particular CPU's machine language in order to be executed (called compiling).
The CPU is the central processing unit. It is the hardware within a computer that carries out the instructions of a program by performing the basic arithmetical, logical and input/output operations of the system.
The CPU is on a chip called the microprocessor and it continuously follow the fetch-decode-execute cycle. Let's look at those 3 steps. Fetch means the CPU retrieves an instruction from main memory. Decode is when the CPU determines what the instruction is, and Execute is when the CPU carries out the instruction.
The main memory (or RAM) is the primary storage area for programs and data that are still in use. Main memory is volatile, and this means the information that's stored there is maintained only as long as electric power is supplied. Secondary memory devices such as a USB flash drive or hard drive provide long-term storage.
Information is stored on a computer digitally. It is broken down into pieces and represented as numbers. Every character is stored as a number, as well as digits, spaces and punctuation. This is called binary representation. A single binary digit is a 1 or 0, called a bit.
The syntax rules of a language determine how the vocabulary elements of a computer language can be combined to form statements.
The semantics of a program statement refers to the purpose and meaning of a statement - what will actually happen when a statement is executed.
A program that is syntactically correct is not always semantically correct, but remember that a program will always do what you tell it to do, not what you intended to tell it to do.
A program can have three types of errors:
Compiler errors. Compiler errors are errors that prevent your program from running. They are syntax errors picked up by the compiler. Most compiler errors are caused by mistakes you make when typing code.
Run-time errors. Run-time errors are errors that occur while your program runs. Run-time errors will cause your program to terminate abnormally. An example of this type of error occurs when you try to divide by zero.
Logical errors. Logical errors occur when the program runs but produces incorrect results. Your program did not do what you intended it to do, for example, you might have used an incorrect formula.
Thanks for reading this summary on computer basics, algorithms and other bits of programming information!
Jan 18, 19 01:31 AM
Cognitive Behavioural Therapy is a model for treating eating disorders. Let's look at CBT for eating disorders, particularly at the principles of cognitive behavioural therapy as well as the structure…
Jan 13, 19 10:22 PM
The beginning of the term is a great time to plan to get a 4.0 GPA. From experience it can be done if you put in the work and dedicate yourself to following the tips I'll talk about below.
Jan 09, 19 07:59 PM
There are some towns in North America with interesting and unusual names that would make you ask twice to check you heard it right. Here are 16 funny town names you're probably not used to - unless yo…
If you can see this, please share this post with the buttons below :)