Computer Science Basics Quiz
45 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 are the main components of a computer?

The main components of a computer are the CPU and storage.

List three properties of computers.

Three properties of computers are speed, accuracy, and consistency.

What does it mean for a computer to be 'general purpose'?

A general-purpose computer can run different programs to achieve various functionalities.

Explain the significance of Moore's Law in the context of computer evolution.

<p>Moore's Law suggests that the number of transistors on a microchip doubles approximately every two years, leading to increased performance and reduced costs.</p> Signup and view all the answers

Can a computer think or be considered intelligent? Why or why not?

<p>No, a computer cannot truly think or be intelligent; it only processes information based on programmed algorithms.</p> Signup and view all the answers

What is the two's complement representation of -5?

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

In a half adder circuit, what is the output for inputs A = 0 and B = 1?

<p>Sum S = 1, Carry C = 0</p> Signup and view all the answers

Explain how the carry output (Cout) is determined in a full adder.

<p>Cout is true if at least two of the inputs A, B, or Cin are logic 1.</p> Signup and view all the answers

What binary values represent positive numbers in two's complement?

<p>Positive numbers begin with '0'.</p> Signup and view all the answers

How is subtraction accomplished using a combinational circuit?

<p>Subtraction X - Y can be performed by adding X and the two's complement of Y.</p> Signup and view all the answers

What is the output of a full adder for inputs A = 1, B = 1, and Cin = 1?

<p>Sum S = 1, Carry COUT = 1</p> Signup and view all the answers

Describe the arrangement of n-bit full adders in a carry chain.

<p>Each full adder's Cout is connected to the Cin of the next adder.</p> Signup and view all the answers

What happens if there is an overflow in an n-bit adder?

<p>The last adder’s carry output indicates if an overflow has occurred.</p> Signup and view all the answers

What is the output Qn of an SR Latch when both S and R inputs are 0?

<p>Qc, meaning there is no change in the output.</p> Signup and view all the answers

In an SR Latch, what happens when the S input is 1 and the R input is 0?

<p>The output Qn is set to 1.</p> Signup and view all the answers

What occurs in an SR Latch when both S and R are set to 1?

<p>The state is undefined.</p> Signup and view all the answers

What is the function of a D Flip-Flop in digital circuits?

<p>A D Flip-Flop stores the input data.</p> Signup and view all the answers

How can a 4-bit register be described in terms of its structure?

<p>It consists of four 1-bit registers operating in parallel.</p> Signup and view all the answers

What does the term 'n-bit registers' refer to?

<p>It refers to n parallel 1-bit registers.</p> Signup and view all the answers

What is meant by '8-byte RAM' in the context of computer architecture?

<p>It refers to a RAM that can store 8 bytes of data.</p> Signup and view all the answers

What is the significance of the clock signal in registers?

<p>The clock signal synchronizes the operation of the registers.</p> Signup and view all the answers

What is the output of a multiplexer (MUX) when the select line is set to 1 and input a is 0 while input b is 1?

<p>The output will be 1.</p> Signup and view all the answers

In a half-subtractor, what is the relationship between the inputs a and b when the output F is 1?

<p>The input <code>a</code> must be 1 and <code>b</code> must be 0.</p> Signup and view all the answers

What does the 'sel' line of a multiplexer do?

<p>The 'sel' line determines which input is passed to the output.</p> Signup and view all the answers

If both inputs of a half-subtractor are set to 1, what will be the output F?

<p>The output <code>F</code> will be 0.</p> Signup and view all the answers

What is the output of the ALU when it performs the AND operation between x2 and y2?

<p>The output will be the bitwise AND of <code>x2</code> and <code>y2</code>.</p> Signup and view all the answers

In the context of the ALU, what do the controls zx and nx typically configure?

<p><code>zx</code> sets the first input to zero, while <code>nx</code> negates the first input.</p> Signup and view all the answers

How does changing the sel value from 0 to 1 affect the output of a multiplexer?

<p>It toggles the output between input <code>a</code> and input <code>b</code>.</p> Signup and view all the answers

What is the purpose of a full adder in an ALU?

<p>The full adder is used to perform addition of two binary numbers, accounting for carry.</p> Signup and view all the answers

What is the size of one byte in bits?

<p>8 bits</p> Signup and view all the answers

When accessing RAM, what is a key restriction concerning registers?

<p>Only one register can be read or updated at a time.</p> Signup and view all the answers

What does the program counter hold?

<p>The address of the next instruction to be executed.</p> Signup and view all the answers

What functionality does the INC signal provide in a program counter?

<p>It enables the counter to increment normally.</p> Signup and view all the answers

In the context of machine code, what does an immediate addressing mode do?

<p>Moves a value directly into Register A.</p> Signup and view all the answers

Describe direct addressing mode in machine code.

<p>The address is taken from Register A to access data stored in RAM.</p> Signup and view all the answers

What is the purpose of the LOAD function in a program counter?

<p>To load a specific address where execution needs to start.</p> Signup and view all the answers

What distinguishes indirect addressing mode from other addressing modes?

<p>The address is not part of the instruction but points to another address for the fetching operation.</p> Signup and view all the answers

What is the purpose of the Fetch-Execute Cycle in computer architecture?

<p>The Fetch-Execute Cycle retrieves and executes instructions from memory, enabling the CPU to perform operations.</p> Signup and view all the answers

Describe the role of the Program Counter (PC) in the instruction fetch phase.

<p>The Program Counter holds the address of the next instruction to be executed, guiding the memory access.</p> Signup and view all the answers

In a C-instruction, what are the three components that need to be decoded?

<p>The three components are dest, comp, and jump, which specify the destination, computation, and jump behavior respectively.</p> Signup and view all the answers

What is the significance of having separate chips for ROM and RAM in the Hack Computer architecture?

<p>ROM is used for permanent program storage while RAM allows for temporary data storage and manipulation during program execution.</p> Signup and view all the answers

How does the instruction format influence the execution in the Hack Computer?

<p>The instruction format dictates how instructions are structured and interpreted by the CPU, affecting execution speed and accuracy.</p> Signup and view all the answers

Explain the role of the ALU in the context of CPU instruction execution.

<p>The Arithmetic Logic Unit (ALU) performs arithmetic and logic operations as specified by the executed instructions.</p> Signup and view all the answers

What function does I/O mapped memory serve in a computer system?

<p>I/O mapped memory is used to interface with input/output devices, allowing data exchange between the CPU and peripherals.</p> Signup and view all the answers

Why is it necessary to decode both A- and C-instructions separately in the Hack Computer?

<p>Decoding A- and C-instructions separately is necessary because they serve different purposes, with A-instructions addressing values and C-instructions controlling operations.</p> Signup and view all the answers

Flashcards

What is a computer?

A device that processes data using a set of instructions, performing calculations, storing information, retrieving data, and displaying results.

What is the CPU?

The central processing unit (CPU) is the brain of the computer, responsible for executing instructions and processing data.

What is storage?

Storage refers to the components that hold data and programs, allowing the computer to retain information even when turned off.

How are computers general-purpose?

Computers are designed to be versatile and can perform different tasks depending on the program they are running, making them adaptable to various situations.

Signup and view all the flashcards

What is the evolution of computers?

The evolution of computers spans generations, marked by advancements in technology, miniaturization, and increased processing power. It's an ongoing journey towards more powerful and efficient computing.

Signup and view all the flashcards

Two's Complement

A binary representation of negative numbers where the most significant bit (MSB) indicates the sign (1 for negative, 0 for positive) and the remaining bits represent the magnitude using Two's Complement.

Signup and view all the flashcards

Half Adder

A logic circuit that performs binary addition of two single-bit inputs, producing a sum and a carry output.

Signup and view all the flashcards

Full Adder

A logic circuit that adds three binary inputs: two data bits (A and B) and a carry-in (Cin). It produces a sum output (S) and a carry-out (Cout).

Signup and view all the flashcards

n-bit Full Adder

A circuit built by chaining multiple full adders to handle the addition of two multi-bit numbers. The carry-out of each full adder is connected as the carry-in to the next full adder in the chain.

Signup and view all the flashcards

Binary Subtraction

A method used in computers to subtract binary numbers by converting subtraction into addition. It involves taking the Two's Complement of the subtrahend and adding it to the minuend.

Signup and view all the flashcards

What is a multiplexer (MUX)?

A digital circuit that allows selecting one of multiple input signals based on a digital control signal.

Signup and view all the flashcards

What are ALU controls?

ALU control signals (like zx, nx, f, no) determine the type of operation the ALU will perform. Each signal controls a particular function, enabling flexible data manipulation.

Signup and view all the flashcards

What does the zx control signal do?

The zx control signal enables or disables the input 'x' of the ALU. When zx is 0, 'x' is passed, and when zx is 1, 'x' is zeroed out.

Signup and view all the flashcards

What does the nx control signal do?

The nx control signal negates (inverts) the input 'x' of the ALU. If nx is 1, the input 'x' is inverted, and if nx is 0, 'x' is passed unchanged.

Signup and view all the flashcards

What does the 'f' control signal do?

The 'f' control signal determines the ALU's operation. It can be used for different logic operations, such as AND, NOT, or OR.

Signup and view all the flashcards

What does the 'no' control signal do?

The 'no' control signal negates the output of the ALU (not always used, depending on the ALU implementation).

Signup and view all the flashcards

What makes the ALU so powerful?

The ALU is a versatile component that can perform both arithmetic and logic operations as per the control signals. It has a key role in processing data within the CPU.

Signup and view all the flashcards

8-bit Register

Each register holds a value represented as a sequence of 8 bits, which can be accessed individually.

Signup and view all the flashcards

RAM (Random Access Memory)

A memory unit that directly stores data in a sequential manner using a series of registers, each with its own unique address.

Signup and view all the flashcards

Program Counter (PC)

A special register that stores the memory address of the next instruction the CPU needs to execute.

Signup and view all the flashcards

INC (Increment)

The process of incrementing the Program Counter (PC) to point to the next instruction in sequence.

Signup and view all the flashcards

LOAD (Program Counter)

Setting the Program Counter (PC) to a specific address, allowing the CPU to start executing instructions from that point onwards.

Signup and view all the flashcards

MUX (Multiplexer)

A mechanism that allows selecting which data source (register) to access or update, based on a specific address.

Signup and view all the flashcards

Machine Code

A set of instructions that the CPU understands directly, expressed in binary code.

Signup and view all the flashcards

Addressing Modes

A way of representing data or program locations within an instruction using different methods, such as immediate values, direct addresses, or indirect addressing.

Signup and view all the flashcards

Fetch-Execute Cycle

A sequence of actions that the CPU follows to execute an instruction, starting with fetching the instruction, decoding it, and finally executing it.

Signup and view all the flashcards

Instruction Memory

The part of the computer architecture that handles the storing and retrieval of instructions.

Signup and view all the flashcards

C-instruction

A type of instruction that modifies data in memory.

Signup and view all the flashcards

A-instruction

A type of instruction that loads or stores values directly.

Signup and view all the flashcards

ALU (Arithmetic Logic Unit)

The part of the CPU responsible for performing calculations and logical operations.

Signup and view all the flashcards

Data Memory

The part of the computer architecture that stores data, often used to hold program variables and temporary results.

Signup and view all the flashcards

ROM (Read-Only Memory)

A type of memory that holds data that cannot be changed, often used to store the computer's boot program.

Signup and view all the flashcards

What is RAM?

A type of memory that stores data randomly, using addresses for access.

Signup and view all the flashcards

What is a latch?

A circuit with a memory element (like flip-flop) that stores a bit of information (0 or 1) and can be set or reset depending on the input signals.

Signup and view all the flashcards

What is an SR latch?

A type of latch that is able to set itself to a '1' or reset itself to a '0' depending on the inputs.

Signup and view all the flashcards

What is a D flip-flop?

A type of flip-flop that stores a single bit of data and can be controlled by a clock signal.

Signup and view all the flashcards

What is a CPU?

The central processing unit of a computer, responsible for carrying out instructions and processing data.

Signup and view all the flashcards

What is an ALU?

A unit within a CPU responsible for performing arithmetic and logical operations on data.

Signup and view all the flashcards

What is a register?

A collection of several D flip-flops working together to store multiple bits of data.

Signup and view all the flashcards

What is a cache?

A specific type of memory that stores instructions and data for the CPU to access quickly during processing.

Signup and view all the flashcards

Study Notes

Course Information

  • Course Title: Computer Fundamentals
  • Course Code: COMP-1027
  • Lecture: 11
  • Topic: Revision + Exam

Learning Objectives

  • Review of all material learned so far
  • Exam format review

Additional Information

  • Lecture 1: Introduction + Evolution
  • Lecture 2: Electronics to Logic Gates Boolean
  • Lecture 3: Combinatorial Circuits
  • Lecture 4: ALU
  • Lecture 5: Sequential Circuits
  • Lecture 6: Machine Code
  • Lecture 7: Memory I/O & CPU Controls
  • Lecture 8: Networks
  • Lecture 9: Socket Programming
  • Lecture 10: ALU + Latches – ZOOM-IN
  • Computer Components: CPU, Storage, HDD, Keyboard, Mouse, Monitor(s), Printer(s)
  • Computer Properties: Fast, Accurate, Consistent
  • Computer Evolution & Generations: Agricultural Revolution, Industrial Revolution, Light-bulb Invention, Moon landing, World Wide Web, Human Genome sequencing, exponentially increasing computational power
  • Abstraction Levels: User, High-Level Language, Assembly Language, System Software, Machine, Control, Digital Logic
  • Numbering Systems: Decimal, Binary, Hexadecimal (Conversions)
  • Negative Numbers: Sign and Magnitude, Excess-3, One's Complement, Two's Complement
  • Combinatorial Circuits: Half Adder, Full Adder
  • Subtraction Circuits: Half-Subtractor
  • Multiplexer (MUX)
  • Program Counter
  • Machine Code
  • Addressing Modes: Immediate, Direct, Indirect
  • Examples of Addressing Modes: Instruction data, memory address, A-instruction's FORMAT, with binary examples
  • Example: Add 1 + 100
  • Latches vs. Flip-Flops
  • Socket Programming (Client-Server): Concepts, example of interaction
  • Socket Programming (Windows): Key functions for client/server communication, example of interaction
  • Assessment: 75% coursework, 25% timed exam
  • Important note: Show all working out during assessment; final answer alone is not sufficient, take hints from questions into account

Studying That Suits You

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

Quiz Team

Related Documents

Description

Test your knowledge on the fundamental components and principles of computers in this quiz. Explore topics such as computer properties, Moore's Law, binary representation, and digital circuits including adders and latches. Perfect for students in introductory computer science courses.

More Like This

Arquitetura de Computadores - ALU
14 questions
Computer Architecture Lecture 1
24 questions
Use Quizgecko on...
Browser
Browser