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

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

Use Quizgecko on...
Browser
Browser