computer program is a sequence of instructions, written to perform a specified task with a computer (by Wikipedia) It has nothing to do with programming language. it's just the definition of program. What is programming language? A programming language is a language (like English language, Persian, Arabic, etc), it has syntax and semantic (syntax: valid sentences and invalid sentences). The meaning of the sentences (semantic), however, depends on the listener (computer). if you want to communicate with computer it should understand what you mean (machine language). However, you can use a high-level programming language and a compiler or an interpreter which translate your language to the machine language. Is programming language a set of programs it accepts? It's another definition of a language, and mainly concerns the syntax. It says a programming language is all the programs which are valid in that language. For example English language is all the texts (infinite) which are according to English words and grammar. But you can't guarantee, these text have any meaning as you read them. However, if we include semantic accuracy (which is meaningful related to the target audience, for example computer) then yes that sentence is true.
The CPU is the heart of the computer. A program is a sequence of instructions stored in main memory. When a program is run, the CPU fetches the instructions and executes or follows the instructions. The fetch/decode/execute cycle
Every program ends up as a sequence of basic instructions that consist of arithmetic and logic operations and control flow operations. Arithmetic and logic operations include add, subtract, multiply, divide and comparison of values (equality, less than, greater than). Control flow operations are used to determine what instruction to execute next. For example, based on the instruction, the program may skip or branch to another part of the instructions list. You will learn the details of how CPUs process instructions in CS 271, Computer architecture and assembly language.
Main memory or RAM is used to store the program while it is executing and to store the data that the program is working with. RAM details
Secondary storage provides long lasting and persistent storage. Unlike RAM, data stored within secondary storage does not disappear when a computers is turned off or restarted. The most common form of secondary storage for large computers is a disk drive but computers can use other forms of secondary storage such as solid state drives which use memory chips that maintain data values without power. Like main memory, secondary storage also stores information as sequences of 0s and 1s as bits and bytes.
We typically think of keyboards and mice but input devices can include cameras, microphones, and many other types of various sensors when you start thinking of computers embedded in cars, electronics, and almost any electrical device.
The information a computer sends to the outside world is called output. If a person is involved, output is typically sent to an output device such as the computer screen or a printer. Not all programs will output data to an output device. Instead, the output may be sent out over a computer network or stored in a database.
15 Questions 45 Marks 15 Mins
The correct answer is option 1 i.e., Program
Additional Information
India’s #1 Learning Platform Start Complete Exam Preparation
Daily Live MasterClasses
Practice Question Bank
Mock Tests & Quizzes Trusted by 3.3 Crore+ Students |