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

    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</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)</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</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</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</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</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

    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

    Use Quizgecko on...
    Browser
    Browser