Computer Programs: Instructions, CPU, and Memory
48 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

The central processing unit, or ______, is the primary component responsible for executing programs in a computer.

CPU

A program, when executed by the CPU, is stored in the computer’s main ______, also known as RAM.

memory

Each location in the computer’s main memory has a sequence number called its ______, which the CPU uses for accessing instructions or data.

address

Computers can only directly execute programs written in a very simple type of language called ______ language.

<p>machine</p> Signup and view all the answers

Besides the active program, computer ______ can also hold data that is being used or processed by the program.

<p>memory</p> Signup and view all the answers

The CPU can ______ information in memory by specifying what to store and the address of the storage location.

<p>store</p> Signup and view all the answers

To access instructions or data in memory, the CPU sends the information's ______ as a signal to the memory.

<p>address</p> Signup and view all the answers

Programs written in other languages need to be ______ into machine language before a computer can execute them.

<p>translated</p> Signup and view all the answers

In a computer system, devices like the keyboard and network interface generate input for the CPU; the CPU detects this data by either continuously checking for it, a method known as ______, or by responding to signals called interrupts.

<p>polling</p> Signup and view all the answers

To handle an interrupt, the CPU saves its current state, including the contents of internal registers like the ______, before executing the interrupt handler.

<p>program counter</p> Signup and view all the answers

Instead of inefficiently polling input devices, a CPU can use ______, which are signals from devices that require the CPU's immediate attention.

<p>interrupts</p> Signup and view all the answers

When a key is pressed on a keyboard, a ______ is sent to the CPU, prompting it to interrupt its current task to process the key press.

<p>keyboard interrupt</p> Signup and view all the answers

Upon receiving an interrupt signal, the CPU suspends its current task and executes a set of instructions specifically designed to handle the interrupt; these instructions are known as an ______.

<p>interrupt handler</p> Signup and view all the answers

The inefficiency of polling is primarily due to the CPU wasting time ______ for input, when it could be performing other computations.

<p>waiting</p> Signup and view all the answers

A device signals an interrupt to the CPU by ______ a wire, triggering the CPU to save its state and execute the appropriate interrupt handler.

<p>turning on</p> Signup and view all the answers

The CPU is designed to automatically save information, such as the contents of important internal registers, so that it can return to the ______ state after handling an interrupt.

<p>same</p> Signup and view all the answers

In Java, the whole applet is considered a ______.

<p>component</p> Signup and view all the answers

Java has two complete sets of GUI components: the AWT (Abstract Windowing Toolkit) and ______.

<p>Swing</p> Signup and view all the answers

Clicking a push button or pressing return in a text field in a Java applet generates an ______.

<p>event</p> Signup and view all the answers

When an event is generated in a Java applet, a ______ is sent to the applet, informing it of the occurrence.

<p>message</p> Signup and view all the answers

Java GUI components are implemented as ______, allowing for object-oriented programming principles to be applied to UI development.

<p>objects</p> Signup and view all the answers

In a Java applet, a ______ component appears alongside the text area when the number of lines of text exceeds the display area.

<p>scrollbar</p> Signup and view all the answers

The program primarily consists of ______ that dictate how the applet responds to various types of events.

<p>event handlers</p> Signup and view all the answers

The right half of the applet is a ______ component, which can display multiple lines of text.

<p>text area</p> Signup and view all the answers

OOP serves as both a program-development instrument and a preliminary resolution for the problem of software ______.

<p>reuse</p> Signup and view all the answers

If a class almost fits into a program, it can be reused by defining a ______ and making small changes necessary to adapt it exactly to your needs.

<p>subclass</p> Signup and view all the answers

In early computing, programs and data were submitted by users to white-coated attendants who would feed them to the computer and return the response after some time, due to the inaccessibility of computers to ordinary people, including most ______.

<p>programmers</p> Signup and view all the answers

The interaction between a user and a computer, where commands are typed and the computer types back its response, is known as a ______-line interface.

<p>command</p> Signup and view all the answers

Today, most people interact with computers using a ______ User Interface (GUI), which includes components like windows, scroll bars, and menus.

<p>Graphical</p> Signup and view all the answers

GUI interface components, such as windows and buttons, have become fairly ______ across different computer platforms like Macintosh, Windows, and Linux.

<p>standard</p> Signup and view all the answers

Java programs are designed to run on many different platforms without modification and can use all the standard GUI components; their functionality should be ______ on any computer on which the program runs.

<p>identical</p> Signup and view all the answers

An "______" is a Java program that is meant to appear on a Web page and often showcases standard GUI interface components.

<p>applet</p> Signup and view all the answers

A web browser uses a protocol called ______ to send each page request and to receive the response from the web server.

<p>HTTP</p> Signup and view all the answers

Special Java programs called ______ are designed to be transmitted over the Internet and displayed on Web pages.

<p>applets</p> Signup and view all the answers

A Web browser that includes an interpreter for the Java ______ can run Java applications right on the Web page.

<p>virtual machine</p> Signup and view all the answers

Java's ______ makes it possible to write network programs that work on many different types of computer.

<p>platform independence</p> Signup and view all the answers

The web browser sends a ______ for a specific page to the computer where the page is stored.

<p>request</p> Signup and view all the answers

When the computer that stores a webpage sends back the page's data, this is called a ______.

<p>response</p> Signup and view all the answers

The programs known as ______ allow web pages to become more than just displays of passive information.

<p>applets</p> Signup and view all the answers

Many large websites use web server software written in ______ because it includes excellent support for network protocols.

<p>Java</p> Signup and view all the answers

[Blank] connections to the Internet, such as DSL and cable modems, are increasingly common and allow faster data transmission than telephone modems.

<p>Broadband</p> Signup and view all the answers

A ______ is a detailed specification of how communication is to proceed over the Internet, ensuring that computers can understand each other.

<p>protocol</p> Signup and view all the answers

The Internet Protocol (______) specifies how data is physically transmitted from one computer to another across the Internet.

<p>IP</p> Signup and view all the answers

The ______ Control Protocol (TCP) ensures that data sent using IP is received in its entirety and without error, confirming reliable communication.

<p>Transmission</p> Signup and view all the answers

All communication over the Internet is in the form of ______, which consist of data and addressing information.

<p>packets</p> Signup and view all the answers

A ______ includes addressing information that indicates where on the Internet the data is supposed to go, similar to an envelope with an address.

<p>packet</p> Signup and view all the answers

GUI's with their visible objects are probably a major factor contributing to the popularity of ______.

<p>OOP</p> Signup and view all the answers

Long messages must be divided among several ______, which are then sent individually over the net and reassembled at their destination.

<p>packets</p> Signup and view all the answers

Flashcards

CPU (Central Processing Unit)

The component that performs computations.

Program

A list of instructions for a computer to follow.

Machine Language

A simple language that the computer can directly understand and execute.

Main Memory (RAM)

Temporary storage that holds programs and data the computer is actively using.

Signup and view all the flashcards

Address

A number that identifies a specific location in computer memory.

Signup and view all the flashcards

Fetch and Execute Cycle

The process by which the CPU retrieves an instruction from memory and carries it out.

Signup and view all the flashcards

Instructions

Unambiguous commands for a computer.

Signup and view all the flashcards

Memory

The computer's main workspace for active data and programs.

Signup and view all the flashcards

CPU

The central processing unit; the 'brain' of the computer that executes instructions.

Signup and view all the flashcards

Data Bus

A pathway that allows different components inside the computer to communicate data.

Signup and view all the flashcards

Address bus

A communication line that specifies the location in memory to be accessed.

Signup and view all the flashcards

Control bus

The lines that carry control signals which coordinate all of the computer's activities.

Signup and view all the flashcards

Polling

Continuously checking input devices for data, which is inefficient due to wasted processing time.

Signup and view all the flashcards

Interrupt

A signal sent to the CPU by a device, prompting the CPU to suspend its current activity.

Signup and view all the flashcards

Interrupt handler

A routine that is automatically executed in response to an interrupt, handling the event that triggered it.

Signup and view all the flashcards

Interrupt Signaling

A mechanical process where a device signals the CPU via a wire, causing the CPU to save its state and run an interrupt handler.

Signup and view all the flashcards

Object-Oriented Programming (OOP)

A programming style centered around objects, offering benefits like code reusability and organization.

Signup and view all the flashcards

Software Reuse

Using existing code in new programs, either directly or by adapting it.

Signup and view all the flashcards

Subclass

A programming construct that inherits properties from a parent class, allowing modification and extension of functionality.

Signup and view all the flashcards

Command-Line Interface

An early method of interacting with computers using typed commands.

Signup and view all the flashcards

Graphical User Interface (GUI)

A visual way to interact with computers using windows, icons, and menus.

Signup and view all the flashcards

GUI Components

Standard visual elements like windows, buttons, and scrollbars in GUI.

Signup and view all the flashcards

Applet

A small application that runs inside another program, often a web page.

Signup and view all the flashcards

Platform Independence

The ability of a program to run on different operating systems without modification.

Signup and view all the flashcards

Text Area Component

A GUI component that displays multiple lines of text and may include a scrollbar.

Signup and view all the flashcards

AWT (Abstract Windowing Toolkit)

A set of original GUI components available in early Java versions.

Signup and view all the flashcards

Swing

An advanced set of GUI components, preferred in modern Java programs (Java 1.2+).

Signup and view all the flashcards

Event (GUI)

An action or interaction that triggers a response in a program.

Signup and view all the flashcards

Event Handler

A routine that specifies how an applet responds to a specific event.

Signup and view all the flashcards

Messages (in Event Handling)

In OOP, they are sent when an event occurs, communicating with objects/components.

Signup and view all the flashcards

GUI Components as Objects

GUI components that are implemented as objects in Java.

Signup and view all the flashcards

GUI (Graphical User Interface)

A user interface that utilizes visual elements like icons and windows.

Signup and view all the flashcards

Network

Computers connected to share data and resources.

Signup and view all the flashcards

Internet

A global network connecting millions of computers.

Signup and view all the flashcards

Broadband

Faster internet connections using technologies like DSL or cable.

Signup and view all the flashcards

Protocol

A detailed specification for how communication should proceed.

Signup and view all the flashcards

TCP/IP

Fundamental protocols for data transmission over the Internet.

Signup and view all the flashcards

Internet Protocol (IP)

IP specifies how data is physically transmitted.

Signup and view all the flashcards

Transmission Control Protocol (TCP)

TCP ensures data is received completely and correctly.

Signup and view all the flashcards

Web Browser

A user interface to the Web that sends page requests and displays responses.

Signup and view all the flashcards

HTTP (HyperText Transfer Protocol)

Protocol used by web browsers to send page requests and receive responses from web servers.

Signup and view all the flashcards

Java Applets

Special Java programs transmitted over the Internet and run within Web pages.

Signup and view all the flashcards

Asynchronous Event

An event that occurs independently of the main program flow, often requiring immediate attention.

Signup and view all the flashcards

Java-enabled Web browser

Interpreters for the Java virtual machine that can run applets right on the Web page.

Signup and view all the flashcards

Java Applications

Complex, stand-alone applications that do not depend on a web browser. Often network-related.

Signup and view all the flashcards

Web Server Software

Software used to handle HTTP requests. Many large websites use Java for their web server software.

Signup and view all the flashcards

Study Notes

  • Programs are lists of instructions for computers to follow mechanically.
  • Computers use machine language to execute programs.
  • Each computer has its own machine language.
  • Programs in other languages must be translated.

CPU and Memory

  • When the CPU runs a program, it is stored in the computer's main memory (RAM).
  • Memory stores the program and any data used.
  • Memory is a sequence of numbered locations, each with an address.
  • The CPU sends an address to access data, and the memory returns the information.
  • The CPU can also store information by specifying the data and the address in memory where it should be stored.

Input/Output Devices

  • Devices like keyboards and mice provide input for the CPU to process.
  • Polling involves the CPU constantly checking for incoming data, but this is inefficient.
  • Interrupts are signals sent to the CPU by other devices.
  • The CPU pauses its current task to handle the interrupt, then returns to the previous task.
  • Interrupts are triggered by events like pressing a key on the keyboard.
  • The CPU saves necessary information to return to its previous state after handling the interrupt.

Modern User Interface

  • Early computers used command-line interfaces, where users typed commands and received responses.
  • Today, most people use a Graphical User Interface (GUI).
  • GUI includes components like windows, scroll bars, menus, buttons, and icons.
  • GUIs have become standardized across platforms like Macintosh, Windows, and Linux.
  • Java programs can use standard GUI components with consistent functionality across platforms.
  • Java has two GUI component sets: AWT (Abstract Windowing Toolkit) and Swing (used in modern programs).
  • GUI components generate events when interacted with.
  • The program responds to events with event handlers.
  • Java GUI components are implemented as objects.

Internet and the World-Wide Web

  • Computers connect on networks to communicate through data, files, or messages.
  • The Internet is a large network connecting millions of computers globally.
  • Internet communication follows protocols, such as TCP/IP, for data transmission and error checking.
  • Communication occurs through packets containing data, addressing information, and a return address.
  • Web browsers use HTTP to request and receive web pages from web servers.
  • Java is closely linked to the Internet and the Web.
  • Java programs called applets are transmitted over the Internet and run on web pages by browsers with a Java virtual machine.
  • Java allows for complex user interaction on web pages.
  • Java is used for complex, stand-alone, network-related applications, like web server software.
  • Java supports network protocols and platform independence.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

Learn about computer programs as lists of instructions executed by the CPU using machine language. Understand how programs are stored in memory and accessed by the CPU. Explore input/output devices and the role of interrupts in efficient data processing.

More Like This

Use Quizgecko on...
Browser
Browser