It is an instruction that causes a program to perform a specific action

Electronic circuitry where overall operation of the computer is controlled. A CPU contains the following:

  • Arithmetic/Logic Unit (ALU): Circuitry for arithmetic and logic computations.
  • Control Unit: Circuitry that co-ordinates CPU actions. Determines the instructions to be excuted by the CPU.
  • Clock: Synchronizes CPU actions.
  • Registers: Very fast CPU specific memory. Typically two types, general purpose and special purpose.
  • Cache: Additional CPU memory to facilitate throughput.

e.g.: Intel Pentium; Motorola/IBM/Apple PowerPC; Sun Microsystems SPARC

CPU/Memory interface:

The CPU is connected to main memory (RAM) by one or more sets of parallel channels (wires) known as a bus. This is the mechnism by which data is transferred between main memory and the CPU.

Machine Instructions:

The Control Unit of a CPU is designed to recognize a limited set of instructions. These instructions may typically be grouped into the following categories:

  • Data access
  • Arithmetic and Logic Operations
  • Control Flow

Instructions may be decomposed into two components:

  • Op-Code : specifies the action
  • Operands: qualifies the action

Instructions may be coded as bit patterns. This idea leads to the notion of a stored program (usually attributed to John von Neumann). The stored program concept essentially says that since instructions may be coded as bit patterns then instructions may be stored in memory as data. The control unit must then be designed to locate and execute these instructions.

Note: A program is a set of instructions that accomplishes a particular task. The act of assembling instructions together in the required order to solve a problem is known as programming.

Hypothetical Machine:

See Appendix C of text.

  • 256 bytes of RAM
  • 16 general purpose registers
  • 2 special purpose registers
    • PC - Program Counter
    • IR - Instruction Register
  • Two byte instructions (coded in hex):
    • Op-Code: 4 bits
    • Operand: next 12 bits

    e.g. 156c, 166d, 5056 (see Appendix C for all 12 instructions)

Fetch/Decode/Execute (FDE) Cycle:

The CPU processes instructions by way of the FDE cycle. This cycle may be described thus:

  1. Fetch
    • Load IR with instruction from address in PC
    • Increment PC (i.e. increase by 2 bytes)
  2. Decode
    • Determine instruction from op-code
    • Determine operands
  3. Execute
    • Perform action for op-code and operands

Assuming that the PC is initially set to a4 then the instructions for this program would be processed as indicated in this FDE trace.

Logic:

Let P represent some statement and Q some other statement. The rules of Boolean logic allow us to determine the truth of statements such as P AND Q, P OR Q, P XOR Q given the truth of the individual statements P, Q. In the binary world of computers the convention is to represent F by the binary digit 0 and T by the binary digit 1. The rules of logic may then be summarized thus:

     P  Q  P AND Q
     -------------
     1  1     1
     1  0     0
     0  1     0
     0  0     0


     P  Q  P OR Q
     -------------
     1  1     1
     1  0     1
     0  1     1
     0  0     0


     P  Q  P XOR Q
     -------------
     1  1     0
     1  0     1
     0  1     1
     0  0     0

The ALU has instructions to accomplish Boolean logic but these instructions apply these rules to groups of bits. That is, we may think of these instructions as generalizations of single bit AND, OR, and XOR. For example:

     11010100
AND  00010000
     -------- 
     00010000            

 
     11010100
 OR  00010000
     --------
     11010100            
 
 
     11010100
XOR  11111111
     --------
     00101011    

Notice the interesting effect of applying the XOR instruction when one of the operands is 1111111. The effect is equivalent to "flipping" or complementing the bits of the other operand!

Computer programming is the most foundational skill in information technology, and for good reason. Programming knowledge makes up every computing innovation we see. Without computer programming, the world as we know it would cease to function. 

Almost all modern tools and institutions—including global commerce, finance, information systems, and more—are built on computer systems. You might have the most innovative app idea in the world, but that idea will only see the light of day if someone has the computer programming knowledge to make it happen.

What is computer programming?

It is an instruction that causes a program to perform a specific action
Computer programming is the art of writing instructions for a computer. These instructions are called “programs.”

As “smart” as they seem to the layperson, computers can’t do anything on their own. Everything a computer does is the result of programs people develop to solve problems, meet needs, or achieve goals.

What is a computer program?

A program is a sequence of commands. Each command causes the computer to perform a specific action. Every action in a computer is a precise set of electrical signals. 

When a computer program is correct and the commands make the computer do what the programmer intends, the computer successfully completes a task.

Today, programmers write their instructions in code, which is text written using the rules of a particular computer language. There are numerous programming languages out there. 

Some of the most popular programming languages include:

  • Java
  • JavaScript
  • Python
  • C++/C
  • C#
  • CSS
  • HTML
  • SQL

Most professionals specialize in a few programming languages. But understanding programming languages on a high level can help professionals learn the fundamentals of many more.

Each language works by taking a programmer’s instructions and translating them into binary code, a sequence of “on” and “off” (or “0” and “1”) instructions. Differences exist in the details, such as syntax, the ways in which the computer translates the language, and more.

Uses of computer programming

The languages you’ll learn as a programmer will depend on what you want to do. For example: 

  • JavaScript powers user-responsive web pages.
  • SQL sends messages to and from databases.
  • C codes operating systems like Windows or Linux.
  • Python is popular for machine learning and artificial intelligence algorithms.

Many languages have multiple uses. For instance:

  • Python handles advanced data processing and data structures, but programmers also use it to create web applications. 
  • Java, a different language than JavaScript, powers the Android operating system as well as many business software programs.

What do computer programmers do?

Professional computer programmers spend most of their days doing one of four things:

  • Creating new code from scratch.
  • Building off existing code to create new functionality.
  • Testing someone else’s code before releasing a product.
  • Debugging code to achieve a desired function.

The end goal is to create a working application, web page, or piece of computer software. If something goes wrong, the programmer searches for the error (“bugs”) and finds the right fix.  

Computer science vs. computer programming

A common question is: What is the difference between computer science and computer programming?

Computer programming involves building things with code. Programming is a hands-on technical skill that involves designing, creating, and refining code to solve problems, build applications, and more.

Computer science is a theoretical field that spans mathematics and computer systems. Instead of building applications, computer scientists solve more abstract problems such as algorithms (finding faster methods of computing numbers), graph problems, and more. Computer scientists are also planners and designers that study computer systems and software. They often develop ideas for how to best solve problems using computers that programmers later on implement in their own work.

An analogy: If programmers are digital builders, then computer scientists are the digital architects. Both are necessary for the final product.

Are computer programmers the same as software developers?

Software developers can be considered “domain-specific” computer programmers. More than just code, they look at software and applications from a high-level perspective and design the technical elements that will work together to achieve a final result.

A computer programmer might automate a task and write a simple script and call it a day. A software developer, however, is responsible for creating an entire application. They must choose and implement specific features based on user needs and create models that determine what code the app will need—software developers must consider more complicated design questions, such as whether to use so-called “object-oriented programming,” “functional programming,” and/or more.

Not all computer programmers are qualified software developers, but most software developers have programming skills. 

Benefits of computer programming knowledge

It is an instruction that causes a program to perform a specific action

In 2019, there were more than two billion computers across the globe. As long as computers run, programmers will be in demand.

Job Opportunities

The U.S. Bureau of Labor Statistics (BLS) anticipates 9,700 new computer programming job openings every year through 2030. Programming jobs pay a median wage of $89,190 per year, more than twice the national median.

At the time of this writing, there are almost 10,000 open computer programming jobs on Indeed. Positions are available across the country, and close to 1,000 are explicitly labeled as remote work.

Entrepreneurship

Because programming is part of every computer innovation, computer programming is the perfect skill for aspiring tech entrepreneurs. With a background in computer programming, you can:

  • Develop and market an app.
  • Start an app development agency.
  • Create a Software-as-a-Service product (a subscription-based software like MailChimp or Hulu).
  • Teach programming online.
  • Create video games with game design and game development.

These are only a few of the business options available to savvy programmers. If you have a tech idea, all you need are the skills to launch it.

Lucrative career options

Computer programming is a gateway skill that opens doors to other technical careers, including:

  • Software Engineering and Development ($110,140/yr)
  • Data science ($126,830/yr)
  • Cybersecurity ($103,590/yr)
  • Database management and administration ($98,860/yr)

A computer programming education is a solid background for any of these fields. Even if you’re not sure which way to go, start with programming and branch out when the time is right.

Getting started in programming

It is an instruction that causes a program to perform a specific action

For years, most programmers entered the workforce with a bachelor’s degree. Today, there are many more pathways to entry, from the traditional degree program to certificate programs and self-study.

Is an instruction that causes a program to perform specific action?

Variables. A statement is a complete instruction that causes the computer to perform some action. A statement may span more than one line.

What is a set of instructions or programs used to run a computer called?

Software. Software is a set of computer programs used on a computer to help perform tasks. Hence option b is the answer.

What is the action on a set of instructions provided to a computer to achieve the desired output?

Program: A computer Program is a set of related instructions written in the language of the computer & is used to make the computer perform a specific task (or, to direct the computer on what to do).

How does a computer execute a program?

The CPU executes a program that is stored as a sequence of machine language instructions in main memory. It does this by repeatedly reading, or fetching, an instruction from memory and then carrying out, or executing, that instruction.