Computer Science Basics Quiz
33 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

What is an accessor method?

A method that accesses an object but does not change it.

Which of the following is the smallest unit of information?

  • Kilobyte
  • Bit (correct)
  • Byte
  • Megabyte

The ASCII character encoding scheme uses 16 bits to represent each character.

False (B)

What is the purpose of the ALU (Arithmetic/Logic Unit)?

<p>The ALU performs arithmetic and logical operations on data.</p> Signup and view all the answers

Explain the concept of encapsulation in object-oriented programming.

<p>Encapsulation is the hiding of implementation details of an object from the outside world.</p> Signup and view all the answers

What is the difference between formal parameters and actual parameters?

<p>Formal parameters are variables declared in a method definition, while actual parameters are the values passed to the method when it is called.</p> Signup and view all the answers

Which of the following is NOT considered a primitive data type in Java?

<p>String (D)</p> Signup and view all the answers

What is the purpose of a loop in programming?

<p>A loop is a sequence of instructions that is executed repeatedly until a certain condition is met.</p> Signup and view all the answers

What is the difference between an accessor method and a mutator method?

<p>An accessor method retrieves data from an object without modifying its state, while a mutator method changes the state of the object.</p> Signup and view all the answers

What is the purpose of the control unit in a computer?

<p>The control unit fetches, decodes, and executes instructions in a program.</p> Signup and view all the answers

Which of the following is an example of mass storage?

<p>Hard Disk Drive (HDD) (D)</p> Signup and view all the answers

What is the function of a constructor?

<p>A constructor initializes a newly created object with specific values.</p> Signup and view all the answers

The Von Neumann architecture allows for the execution of one instruction at a time.

<p>True (A)</p> Signup and view all the answers

What is the difference between a local variable and an instance variable?

<p>A local variable has scope within a block of code, while an instance variable is associated with an object and persists throughout its lifetime.</p> Signup and view all the answers

Explain the concept of the "stored program concept" in computer architecture.

<p>The stored program concept states that instructions to be executed by a computer are stored in memory as binary data.</p> Signup and view all the answers

Which of the following is an example of a logic gate?

<p>All of the above (D)</p> Signup and view all the answers

What is the purpose of an I/O buffer?

<p>An I/O buffer temporarily stores data being transferred between the main memory and an I/O device.</p> Signup and view all the answers

What is an object reference?

<p>An object reference is a variable that stores the memory address of an object.</p> Signup and view all the answers

What is the purpose of a cache memory?

<p>Cache memory is a high-speed memory unit used to store frequently accessed data for faster retrieval.</p> Signup and view all the answers

Which of the following best describes the purpose of an IDE (Integrated Development Environment)?

<p>A software application that provides a comprehensive set of tools for software development (D)</p> Signup and view all the answers

Which of the following is a characteristic of Random Access Memory (RAM)?

<p>It provides fast access to data (B)</p> Signup and view all the answers

What is the difference between a byte and a bit?

<p>A byte consists of 8 bits.</p> Signup and view all the answers

What is the purpose of a truth table?

<p>A truth table is used to represent the logical output of a boolean expression based on all possible combinations of its input values.</p> Signup and view all the answers

What are the three main boolean operators in Java?

<p>The three main boolean operators in Java are &amp;&amp; (logical AND), || (logical OR), and ! (logical NOT).</p> Signup and view all the answers

Explain the concept of parameter passing in programming.

<p>Parameter passing is the process of providing actual values to the formal parameters of a method when it is called.</p> Signup and view all the answers

What is pseudocode?

<p>Pseudocode is a high-level description of a program or algorithm using a mixture of English and informal programming language syntax.</p> Signup and view all the answers

What is the purpose of the Memory Address Register (MAR)?

<p>The MAR holds the address of the memory cell to be accessed.</p> Signup and view all the answers

What is the purpose of the Memory Data Register (MDR)?

<p>The MDR contains the data value being fetched from or stored to memory.</p> Signup and view all the answers

What is the purpose of the stored program concept?

<p>The stored program concept enables instructions to be represented as binary data and stored in computer memory for execution.</p> Signup and view all the answers

What is meant by the "scope" of a variable in programming?

<p>The scope of a variable refers to the region of a program where it is accessible.</p> Signup and view all the answers

What is the main purpose of an I/O controller?

<p>An I/O controller manages the communication between the CPU and peripheral devices (like keyboard, monitor, etc.).</p> Signup and view all the answers

What is object-oriented programming?

<p>Object-oriented programming is a paradigm where programs are designed around objects, their properties (data), and their behaviors (methods).</p> Signup and view all the answers

What is a method signature?

<p>A method signature consists of the method name and the types of its parameters.</p> Signup and view all the answers

Flashcards

Accessor Method

A method that retrieves information from an object without modifying it.

Address

A unique location in memory where data is stored.

Algorithm

A set of steps to solve a problem, written in unambiguous instructions.

Argument

The value passed to a method or function.

Signup and view all the flashcards

ASCII

A standard code for representing characters using numbers.

Signup and view all the flashcards

Binary

A number system with only two digits: 0 and 1.

Signup and view all the flashcards

Bit

The smallest unit of data, representing either 0 or 1.

Signup and view all the flashcards

Boolean

A data type with only two values: true or false.

Signup and view all the flashcards

Boolean Expression

An expression that evaluates to either true or false.

Signup and view all the flashcards

Boolean Operator

A symbol like AND, OR, NOT used to combine Boolean values.

Signup and view all the flashcards

Byte

A group of 8 bits, often used to store a single character.

Signup and view all the flashcards

Cache Memory

A fast, small memory used to store frequently accessed data.

Signup and view all the flashcards

Cast

Changing the data type of a variable explicitly.

Signup and view all the flashcards

Class

A blueprint for creating objects, defining their properties and behavior.

Signup and view all the flashcards

Constructor

A special method that initializes an object when it's created.

Signup and view all the flashcards

Control Unit

The part of the CPU that manages the execution of instructions.

Signup and view all the flashcards

Encapsulation

Hiding the implementation details of an object.

Signup and view all the flashcards

Explicit Parameter

A value provided to a method when it's called.

Signup and view all the flashcards

Formal Parameter

A variable defined in a method's declaration, representing an input value.

Signup and view all the flashcards

Gigabyte

A unit of data equal to one billion bytes.

Signup and view all the flashcards

I/O Buffer

A temporary storage area for data being transferred between devices.

Signup and view all the flashcards

I/O Controller

Manages communication between the computer and external devices.

Signup and view all the flashcards

IDE

Integrated Development Environment, a software suite for programmers.

Signup and view all the flashcards

Implicit Parameter

The object on which a method is called.

Signup and view all the flashcards

Initialize

Giving a variable its starting value.

Signup and view all the flashcards

Instance

A specific object created from a class.

Signup and view all the flashcards

Instance Variable

A variable belonging to an object, with its own unique value.

Signup and view all the flashcards

Instantiation

Creating an object from a class.

Signup and view all the flashcards

Instruction Set

The set of commands a CPU understands.

Signup and view all the flashcards

Kilobyte

A unit of data equal to 1024 bytes.

Signup and view all the flashcards

Local Variable

A variable accessible only within a specific block of code.

Signup and view all the flashcards

Loop

A block of code that repeats a set of instructions.

Signup and view all the flashcards

Machine Language

The lowest level of programming language, directly understood by the CPU.

Signup and view all the flashcards

Mass Storage

Non-volatile storage devices for large amounts of data.

Signup and view all the flashcards

Megabyte

A unit of data equal to 1,048,576 bytes.

Signup and view all the flashcards

Memory

Where data and instructions are stored within a computer.

Signup and view all the flashcards

Memory Address Register (MAR)

A register that stores the address of the memory location being accessed.

Signup and view all the flashcards

Memory Data Register (MDR)

A register that holds the data being read from or written to memory.

Signup and view all the flashcards

Method

A block of code that performs a specific task.

Signup and view all the flashcards

Mutator Method

A method that modifies the state of an object.

Signup and view all the flashcards

Object

An instance of a class, representing a real-world thing.

Signup and view all the flashcards

Object Reference

A variable that points to the location of an object.

Signup and view all the flashcards

Object-Oriented Programming

A programming paradigm that focuses on objects and their relationships.

Signup and view all the flashcards

Parameter

A value passed to a method or function when it's called.

Signup and view all the flashcards

Parameter Passing

The process of providing values to a method's parameters when calling it.

Signup and view all the flashcards

Primitive Data Type

Basic data types built into a programming language.

Signup and view all the flashcards

Pseudocode

A high-level description of an algorithm using English and programming-like syntax.

Signup and view all the flashcards

Random Access Memory (RAM)

Volatile memory used to store data and instructions for running programs.

Signup and view all the flashcards

Register

A small, high-speed memory location inside the CPU.

Signup and view all the flashcards

Scope

The region of code where a variable is accessible.

Signup and view all the flashcards

Software

Programs and instructions that tell a computer what to do.

Signup and view all the flashcards

Stored Program Concept

Programs are stored in memory as data, allowing the CPU to execute them.

Signup and view all the flashcards

Syntax

The rules of a programming language.

Signup and view all the flashcards

Terabyte

A unit of data equal to one trillion bytes.

Signup and view all the flashcards

Transistor

A semiconductor device that acts as a switch, forming the basis of modern computers.

Signup and view all the flashcards

Truth Table

A table showing the output of a logical operation for all possible inputs.

Signup and view all the flashcards

Von Neumann Architecture

A computer architecture where both data and instructions share the same memory.

Signup and view all the flashcards

Whitespace

Spaces, tabs, and newlines used to format code.

Signup and view all the flashcards

Study Notes

Accessor Methods

  • Methods that access an object without altering it.

Address

  • Location in memory for storing data (typically a byte).
  • Addresses can be absolute or relative.
  • Memory accesses target a specific cell at a designated address.

Algorithm

  • Well-defined set of steps leading to a result within a finite time.
  • Must be unambiguous, executable, and terminating.

Argument

  • An actual parameter supplied to a method.
  • Values used with operators.

ALU (Arithmetic/Logic Unit)

  • Component of a CPU that performs arithmetic and logical operations.

ASCII

  • American Standard Code for Information Interchange.
  • Character encoding scheme for representing text in computers.
  • Uses 8 bits per character, capable of representing 256 characters (0-255).
  • Largely superseded by Unicode.

Binary

  • Base-2 numbering system.
  • Represents values using only 0 and 1.

Bit

  • Short for binary digit.
  • Smallest unit of information (0 or 1).

Boolean

  • Data type representing truth values (true or false).

Boolean Expression

  • Expression that evaluates to a boolean value (true or false).

Boolean Operator

  • Operator used with boolean values.
  • Java's logical operators: &&, ||, !.

Byte

  • 8 bits.
  • Fundamental unit of storage on most computers.

Cache Memory

  • Special, high-speed memory.
  • Stores frequently accessed data.
  • Accessing is faster than RAM.
  • Improves efficiency by leveraging "locality of reference".

Cast

  • Explicit conversion between data types.

Class

  • Programmer-defined data type.
  • Blueprint for creating objects.

Computer

  • Device that executes instructions.
  • Study of algorithms, hardware, and applications.

Constructor

  • Code to initialize newly created objects.

Control Unit

  • Part of CPU that fetches, decodes, and executes instructions.
  • Manages instruction processing.

Encapsulation

  • Hiding implementation details of an object.

Explicit Parameter

  • Parameter passed to a method apart from the object.

FLOPS (Floating-Point Operations Per Second)

  • Measure of computing performance.

Formal Parameter

  • Variable in a method definition.
  • Holds value passed from a method call.

Gigabyte (GB)

  • 1 billion bytes (230 bytes).

I/O Buffer

  • Temporary memory in I/O controller (Input/Output).
  • Data storage during I/O operations.

I/O Controller

  • Manages communication between CPU and I/O devices.
  • Contains a buffer for temporary data storage.
  • Notifies the CPU when I/O operations are complete.

IDE (Integrated Development Environment)

  • Software for program development.
  • Includes features like editors, compilers, and debuggers.

Implicit Parameter

  • Object on which a method is invoked.

Initialize

  • Assigning a value to a variable.

Instance

  • Object of a given class.

Instance Variable

  • Variable defined within a class.
  • Each object has its own value for the variable.

Instantiation

  • Creating an object from a class.

Instruction Set

  • Collection of commands a CPU can execute.

Kilobyte (KB)

  • 1000 bytes (210 bytes).

Local Variable

  • Variable confined to a block of code.

Logic Gate

  • Physical device that performs a Boolean operation (e.g., AND, OR, NOT).

Loop

  • Sequence of instructions executed repeatedly.

Machine Language

  • Instructions directly executable by a CPU.

Mass Storage

  • Non-volatile storage for large amounts of data.
  • Includes DASDs (direct access) and SASDs (sequential access).

Megabyte (MB)

  • 1 million bytes (220 bytes).

Memory

  • Stores instructions and data during execution.
  • Random Access Memory (RAM) characteristics: Memory divided into easily addressable cells, access to all cells at the same speed..

Memory Registers (MAR and MDR)

  • MAR: Holds the memory address being accessed.
  • MDR: Holds the data being fetched or stored.

Method

  • Set of statements with a name, potential parameters, and likely a return value.
  • Can be invoked multiple times, with varying arguments.
  • Has a signature (name, parameter types).

Mutator Method

  • Method that modifies the state of an object.

Object

  • Instance of a class.

Object Reference

  • Value that points to an object's location in memory.

Object-Oriented Programming (OOP)

  • Programming paradigm centered around objects.
  • Describes objects, their properties, and relationships.

Parameter

  • Information supplied to a method when called.

Parameter Passing

  • Providing values for a method's parameters.

Primitive Data Type

  • Basic data type (e.g., int, char, boolean).

Pseudocode

  • Informal description of an algorithm.

RAM (Random Access Memory)

  • Stores data and instructions needed during program execution.

Register

  • Temporary storage for operands and results of operations.

Scope

  • Region of a program where a variable is accessible.

Software

  • Programs, procedures, and documentation for computer operation.

Stored Program Concept

  • Core of Von Neumann architecture.
  • Instructions stored in memory, enabling flexible program execution.

Syntax

  • Rules for constructing instructions in a programming language.

Terabyte (TB)

  • 1 trillion bytes (240 bytes).

Transistor

  • Fundamental component of modern computers.
  • A switch with 'on' or 'off' states.

Truth Table

  • Table showing output of every possible input combination for a logical expression.

Von Neumann Architecture

  • Theoretical model for modern computers.
  • Common characteristics include memory, I/O, ALU, and control units, with sequential instruction execution.

White Space

  • Space, tab, and newline characters.

Studying That Suits You

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

Quiz Team

Description

Test your understanding of fundamental computer science concepts including accessor methods, algorithms, and data representations. This quiz covers essential terms like ALU, ASCII, and binary systems. Perfect for beginners or anyone looking to refresh their knowledge!

More Like This

Computer Science Class 11 Overview
5 questions
Year 9 Computer Science Revision
24 questions
Computer Science Basics Quiz
116 questions
Use Quizgecko on...
Browser
Browser