Computer Basics: Data, CPU, and Characteristics

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

Which of the following best describes 'data' in the context of computer science?

  • Facts organized in a useful manner.
  • Processed facts that are meaningful.
  • Information after it has been analyzed.
  • Unorganized and unrefined facts and figures. (correct)

A computer program exhibits diligence if it easily gets bored performing the same tasks repeatedly for long durations.

False (B)

What is the primary function of the Arithmetic Logic Unit (ALU) within a CPU?

Performing arithmetic and logical operations.

A _______ is the smallest unit of memory, representing either 0 or 1.

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

Which type of memory loses its data when power is turned off?

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

The octal number system has a base of 10.

<p>False (B)</p> Signup and view all the answers

Convert the binary number 1010 to its decimal equivalent.

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

In the hexadecimal number system, the letter 'A' represents the decimal value of _______.

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

Which of the following conversions is correct according to the shortcut methods?

<p>Binary <code>1101101</code> to Octal is <code>155</code> (C)</p> Signup and view all the answers

When performing 2's complement, the bits to the right of the first '1' from the right changes.

<p>False (B)</p> Signup and view all the answers

What is the 2's complement representation of -26, assuming an 8-bit format?

<p>11100110 (C)</p> Signup and view all the answers

In which representation, for a positive number, all three representations (Sign magnitude method, 1’s complement method, 2’s complement method) are same.

<p>Positive sign magnitude (B)</p> Signup and view all the answers

A step-by-step procedure to solve a problem algorithm is called _______.

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

A flowchart represents the steps of an algorithm using pictorial representation.

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

Which of the following is an advantage of high-level programming languages?

<p>They are easier to develop programs in. (D)</p> Signup and view all the answers

Match the following language translators with their function:

<p>Assembler = Converts Assembly Level Language to Machine Language Compiler = Converts High Level Language to Machine Language (all at once) Interpreter = Converts High Level Language to Machine Language (line by line)</p> Signup and view all the answers

Procedure-oriented programming revolves around the concept of objects.

<p>False (B)</p> Signup and view all the answers

Name three basic Boolean operators.

<p>OR, AND, NOT</p> Signup and view all the answers

Which logic gate gives an output of 1 only when all inputs are 1?

<p>AND (B)</p> Signup and view all the answers

A ________ gate is also called a universal gate because it can implement any Boolean function without needing other logic gates.

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

An operating system acts as an interface between the user and the computer hardware.

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

Which of the following is NOT a primary function of an operating system?

<p>Hardware Design (C)</p> Signup and view all the answers

What does 'LAN' stand for in the context of computer networks?

<p>Local Area Network</p> Signup and view all the answers

A ________ topology connects all nodes to a main cable in a linear fashion.

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

In a star topology, failure of a single node always leads to network failure.

<p>False (B)</p> Signup and view all the answers

Which network device operates by sending data only to the intended destination computer?

<p>Switch (B)</p> Signup and view all the answers

What is the purpose of a MAC address?

<p>To uniquely identify a device on a network.</p> Signup and view all the answers

Python is a ________ and open-source language.

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

Which of the following are all collection data types in Python?

<p>List, Tuple, Dictionary (A)</p> Signup and view all the answers

Python literals can hold only numeric value.

<p>False (B)</p> Signup and view all the answers

What is the use of # in python programming?

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

The if...elif...________ statement will evaluate the test expression and execute the remaining statements only if the given test expression turns out to be true.

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

Which loop do you used for sequential traversal in python?

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

Else section is not available in for loop and while loop in python.

<p>False (B)</p> Signup and view all the answers

What are the two modes in python programming?

<p>interactive and script mode</p> Signup and view all the answers

________ refers to the spaces at the beginning of a code line in python.

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

Which function is used to display a string in double quotes in python?

<p>print() (C)</p> Signup and view all the answers

String slicing is done in string, List and Tuple in python.

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

When are you supposed to use universal gate when using boolean operator?

<p>using NAND gates or NOR gates</p> Signup and view all the answers

Python data, is stored in a ________ called list.

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

Which of the following methods adds an item at the end of the list?

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

You must always have ordered item when using dictionary.

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

Dictionary is also referred as

<p>key : value pairs</p> Signup and view all the answers

The four primitive data structures are _______ float, string, and boolean.

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

Which of the following is the definition of Data?

<p>simply values or sets of values (D)</p> Signup and view all the answers

Flashcards

What is Data?

Raw facts and figures that lack organization or context.

What is Information?

Processed data that is related, meaningful, and provides context.

What is Versatility?

The capability to perform different jobs efficiently.

What is Diligence?

Performing same task for a long time without being bored

Signup and view all the flashcards

What is the Input Unit?

Unit that feeds data into the computer for processing.

Signup and view all the flashcards

What is the Output Unit?

Unit where processed information is displayed or outputted.

Signup and view all the flashcards

ALU

Unit where arithmetic and logical operations are performed.

Signup and view all the flashcards

Control Unit

Unit that controls all operations in the computer.

Signup and view all the flashcards

What are Registers?

Small, fast memory cells inside the CPU used for temporary storage.

Signup and view all the flashcards

What is Main Memory?

Unit where data needed for processing is stored.

Signup and view all the flashcards

What is a Keyboard?

Device that allows text to be input to the computer.

Signup and view all the flashcards

What is a Mouse?

Pointing device used to select items on the screen.

Signup and view all the flashcards

What is a Scanner?

Device that converts images or documents into digital form.

Signup and view all the flashcards

What is a Microphone?

Device that receives sound and converts it into input.

Signup and view all the flashcards

What is OMR?

Special sheet where answers are darkened for automated reading.

Signup and view all the flashcards

What is a Barcode?

Code set made of dark and white bars that contains item information.

Signup and view all the flashcards

What is a Printer?

Device that produces a hard copy output on paper, like text or graphics

Signup and view all the flashcards

What is an Impact Printer?

Printer with direct contact between print head and paper.

Signup and view all the flashcards

What is a Non-Impact Printer?

Printer with no contact between print head and paper.

Signup and view all the flashcards

What is a Monitor?

Output device that produces a soft copy output.

Signup and view all the flashcards

What is a Projector?

Output device that projects images or videos onto a large screen.

Signup and view all the flashcards

What is a Plotter?

Printer that interprets commands to create line drawings.

Signup and view all the flashcards

What is Computer Memory?

Stores data, information, and instructions for processing.

Signup and view all the flashcards

What is a Bit?

Smallest unit of memory, either 0 or 1.

Signup and view all the flashcards

What is a Nibble?

Collection of 4 bits

Signup and view all the flashcards

What is a Byte?

Collection of 8 bits; a unit of memory.

Signup and view all the flashcards

What is Primary Memory?

Actual memory of computer directly accessed by the CPU.

Signup and view all the flashcards

What is Secondary Memory?

Additional memory physically separate from primary memory.

Signup and view all the flashcards

What is RAM?

Volatile memory for read and write operations; loses data without power.

Signup and view all the flashcards

What is ROM?

Non-volatile memory for read-only operations; data is permanent.

Signup and view all the flashcards

What is the Base?

Number of different symbols used in a number system.

Signup and view all the flashcards

What is Binary?

Number system whose base is 2.

Signup and view all the flashcards

What is Octal?

Number system whose base is 8.

Signup and view all the flashcards

What is Hexadecimal?

Number system whose base is 16.

Signup and view all the flashcards

What is Decimal?

Number system whose base is 10.

Signup and view all the flashcards

How to get 1's complement

Invert all bits (change 0 to 1, 1 to 0).

Signup and view all the flashcards

How to get 2's complement

Find 1's complement, then add 1 to the LSB.

Signup and view all the flashcards

What is an Algorithm?

Step-by-step process to solve a problem.

Signup and view all the flashcards

What is Flowchart?

Pictorial representation of an algorithm.

Signup and view all the flashcards

Study Notes

Unit 1: Software Construction Essentials

Data and Information

  • Data constitutes raw, unorganized facts and figures including numbers, symbols, characters, words, codes, and graphs
  • Information is processed data, relating to a context and having meaning, i.e. "Raju is an 18 year old boy"
  • Data processing is when a computer accepts data and produces information

Characteristics of Computers

  • Speed is a defining feature
  • Computers deliver Accuracy
  • Huge Storage capacity is part of computers functionality
  • Offer Versatility; the ability to adapt to different jobs
  • Demonstrate Diligence; computers do not feel boredom while performing repetitive tasks over time

Disadvantages of Computers

  • Exhibit a Lack of IQ
  • Cannot make decisions

Block Diagram of a Computer

  • A computer comprises an Input Unit, Central Processing Unit (CPU), Storage Unit, and Output Unit
  • The CPU includes the Control Unit, Arithmetic Logic Unit (ALU), and Registers
  • The Storage Unit has Primary Storage and Secondary Storage

Input and Output Units

Input Unit

  • Formed upon connection of an input device to a computer
  • Feeds data into the computer to be processed

Output Unit

  • Formed when an output device connects to the computer
  • Displays the result after processing

CPU (Central Processing Unit)

  • Referred to as the 'Brain of Computer'
  • Subdivided further into the Arithmetic Logic Unit (ALU), Control Unit, and Registers

ALU (Arithmetic and Logic Unit)

  • Executes all arithmetic operations (addition, subtraction, multiplication, division, etc.)
  • Executes logical operations (less than, greater than)

Control Unit

  • Manages all processes within the computer
  • Generates control signals for operations

Registers

  • Small memory cells inside the CPU
  • Temporarily store intermediate results

Main Memory

  • Stores necessary data for data processing
  • Results are also saved in this unit until transferred to the output unit

Input Devices

  • Used to input data into computer, converting it from human to computer readable form and allowing human readable format
  • The keyboard is commonly used, with a QWERTY layout for text input, available in wired and wireless options
  • The mouse is a pointing device used to select items when the cursor reaches them, available in wired and wireless options
  • The scanner digitizes images/documents and inputs the result into the computer
  • Microphone receives sound and inputs to the computer
  • OMR (Optical Mark Reader) is for objective tests using special sheets; answer sheets can be valued after reading the sheet
  • A barcode reader scans codes as alternate dark/white bars, decodes item details, and inputs data

Output Devices

  • These convert data from computer to human readable form producing soft or hard copies
  • A printer produces hard copy output on paper. There are impact and non-impact printers, for examples dot matrix, inkjet, and laser printers
  • A monitor produces soft copy output, termed VDU (Visual Display Unit) in various types such as LCD/LED
  • A speaker is an output device that generates sound
  • A projector displays images/videos on a large surface
  • A plotter interprets computer commands to create line drawings with automated pens

Storage Types

  • Computer Memory is used to store data, information, and instructions, acting as a storage unit where data is processed
  • Bit is the smallest memory unit, whether 0 or 1
  • A Nibble is a collection of 4 bits
  • A Byte is a collection of 8 bits

Units of Computer Memory

  • 1 Byte is 8 bits
  • 1 KB(Kilobyte) is 1024 Bytes
  • 1 MB(Megabyte) is 1024 KB
  • 1 GB(Gigabyte) is 1024 MB
  • 1 TB(Terabyte) is 1024 GB
  • 1 PB(Petabyte) is 1024 TB

Types of Computer Memory

  • Divide into Primary and Secondary memory

Primary Memory

  • It is the actual memory that computer uses
  • The CPU directly fetches data from primary memory

Secondary Memory

  • Serves as additional memory, physically separate from the main system
  • Examples include hard disks, flash memory, CDs, and DVDs

Primary Memory Types

  • RAM (Random Access Memory) can read and write data into, but is volatile so data is lost goes if power cycles. DRAM & SRAM are types of RAM
  • ROM (Read-Only Memory) can only read data from. EPROM, EEPROM & PROM are categories

RAM Volatility

  • RAM is called volatile because the stored data is lost when the power is switched off

Need for Secondary Memory

  • Primary memory is volatile, secondary is permanent
  • Secondary memory is able to store huge amounts of data
  • Cost per bit of secondary memory is low

Number System

  • The quantity of unique symbols used in it dictates the 'base' of a base numbering system
  • The binary base numbering system uses 0/1 and has base 2; computers use this numbering system internally
  • An octal base numbering system uses 0-7; has base 8
  • A Hexadecimal base numbering system uses 0-9 and A-F(10-15) and has base 16
  • Decimal has base 10, using 0-9 and is conveniently used for human interface interactions

Conversion to Decimal

  • Conversion from binary, octal, and hexadecimal

Conversion from Decimal

  • Transform from decimal to binary, octal, and hexadecimal is a function performed by computers efficiently

Conversion From Binary to Octal

  • Bits are grouped from LSB to MSB, then number of each group is written

Conversion From Binary to Hexadecimal

  • Each group should contain exactly 4 bits

Conversion From Octal to Binary

  • Using shortcut method

Conversion From Hexadecimal to Binary

  • Used using shortcut method

1's Complement

  • To get 1's complement of a number, invert all bits (swap 0 to 1 and 1 to 0)

2's Complement

  • In order to get the 2's complement of a number, first identify the 1's complement number of a binary; next add 1 to the LSB

Short Cut Method for finding the 2's Complement

  • Invert all bits followed by the first '1' from the right

Sign-Magnitude Representation

  • Sign-Magnitude involves using the MSB to indicate the sign; 0 for positive, 1 for negative in an 8 bit stream

One's Complement Representation

  • If the number is +ve, The 8-bit number itself is the representation
  • If the number is -ve, find the 1's complement of 8 bit number

Two's Complement Representation

  • If the number is +ve, The 8-bit number itself is the representation
  • If the number is -ve, find the 2's complement of 8 bit number

Algorithm and Flowchart

  • Algorithm is the step by step instructions to solve problems
  • A flowchart is the pictorial representation of the algorithm
  • Includes terminal shapes to show start and stop
  • Input/Output shapes to show data flow
  • Decision represents test conditions that result in True or False
  • Processes represents operations run upon data
  • And Connectors which piece together the logic in a diagram

Unit 2: Operating Systems and Computer Networks

Operating System (OS)

  • A set of programs acting as an interface between the user and computer to ensure convenient computer use with examples such as Windows, Linux, Android, Mac OS, and iOS

Main Operating System Functions

  • Process Management
  • Memory management
  • File Management
  • Device Management

Different Types of Operating Systems

  • Batch, Multiprogramming, Multitasking, Real Time, Distributed, and Mobile Operating Systems

Computer Network

  • An interconnected collection of computers facilitating mutual communication

Computer Networking Needs

  • Resource sharing
  • Communication
  • Reliability
  • Reduced costs

Different Types of Networks by coverage:

  • Personal Area Network (PAN) connects devices around a single person
  • Local Area Network (LAN) exists within a room, building or campus
  • Metropolitan Area Network (MAN) spans a city with 100KM radius
  • Wide Area Network (WAN) covers large geographic spans and countries

Network Topologies

  • Network Topology is the layout arrangement of nodes like computers, or devices in a computer network. Different topologies can affect a network’s performance, stability and cost.
  • Bus Topology uses a main cable for all node connections along a linear design
  • Star Topology makes each node connect to a central hub or switch using separate cables
  • Ring Topology links all nodes in a circular route with data traveling one way
  • Tree topology combines aspects of different structures in a hierarchical layout connecting all computers with each other
  • Mesh topology directly connects each node to every other node for redundancy and speed

Advantages of Various Network Topologies

  • Bus: The cable may be cut to affect just one node
  • Star: easy to diagnose faults and cable failure will not affect the entire network
  • Ring: Less cabling is needed, and data transfer speed will be very high
  • Tree: expandable and offers simple detection for errors
  • Mesh: single point of failure will not break network; Provides high privacy and security

Disadvantages of Various Network Topologies

  • Bus: The main cable may break down the network. Single node is the only thing able to transit data.
  • Star: Needs large more cables and central unit. If the central unit fails, the entire network fails.
  • Ring: A break in the network or one node will close down the network; Expanding is difficult.
  • Tree: Maintenance is difficult and configuring tree topology networks is difficult
  • Mesh: The cable length is expensive and the structure is complex

Network Protocols

  • Network protocols are the communication rules between network devices. Some examples include TCP, IP, UDP, FTP, HTTP, and HTTPS

Network Devices

  • A modem converts analog to digital signals and vice versa, performing modulation/demodulation
  • A hub connects devices in a LAN, with data sent to every computer
  • A switch also connects devices in a LAN but sends data only to the destination computer
  • A router facilitates communication between two computers on different networks
  • A repeater amplifies signals before retransmission
  • MAC address is the 12-digit physical hardware number identifying a network device (6 byte)
  • IP address is the numerical address assigned to each device and can be IPv4(32 bit) or IPv6(128 bit)

Unit 3: Python Programming

Introduction to Python

  • Python is a high-level, general-purpose programming language designed by Guido van Rossum, Python Software Foundation
  • Python is a High level language
  • Pyhton is a free and open language

Features of Python

  • Flexible programs use high-level language
  • Python is free and open source
  • Interpreted language execution is what python offers
  • Code has case sensitivity
  • Platform Independent

Tokens:

  • These are individual code snippets within a Python program, which make up statements and instructions and are composed of keywords, identifiers, literals, operators, and punctuators

Naming Identifiers:

  • Identifiers must start with a letter or underscore and cannot use keywords, special symbols, or whitespace
  • Examples of valid identifiers include A1, Abc, and First_number, while invalid identifiers include 3B, b-m, and a@1

Variable in Python

  • Refers to an object or memory location that can store an item or element and are implicitly declared

Comments

  • Added using hash sign and provide remark but are non-exeuting and can add multiple quotation for multiple line comments.

Data Types in Python

  • Includes integer, numeric, complex number, float, set booloean etc. Literal refers to a value directly represented with fixed data type such as String, etc.

Python Strings

  • A group of string of characters which use string values in single quatation or doubles ''

String Slicing

  • Can be done, in colon and slicing format as indexes for character display

Operations

  • Arithmetic operators (+, -, *, /) perform calculations between two numerical values
  • Assignment signs assign to variables
  • Operators use for comparison purposes
  • Operators assess the relationship of data etc with Logical Operators
  • Bitwise Operators the operands' values are processed at the bit level for every two operands.

Punctuators

  • Symbols which organize python's language

Type Conversions

  • Function in Python is essential to data type conversion

Python Loops

  • For loops through and repeats; while repeats

Statements:

  • "Jump" to specific location with break, can continue and pass.

String Functions:

  • Returns characters in multiple ways such as upper case functions, etc.

Unit 4: Data Structures

Data Structures

  • Data is organized, stored, and manipulated, reducing space

Data structures Classifications

  • Classified in primitive and non-primitive

Data Structure Details

  • Classified in linear and non linear lists

Details in Array

  • Stored in one single dimension

Python Stack

  • Data structure that is lineal in the last in first out (LIFO) manner

Python Tree

  • Made up of non linear data, storing each code in nodes and child elements

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Introduction to Computer Hardware
5 questions

Introduction to Computer Hardware

AppreciatedCherryTree6930 avatar
AppreciatedCherryTree6930
Computer Components Overview
13 questions
Computer Hardware Basics
39 questions

Computer Hardware Basics

SharpestJacksonville3338 avatar
SharpestJacksonville3338
Use Quizgecko on...
Browser
Browser