Podcast
Questions and Answers
Which of the following best describes 'data' in the context of computer science?
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.
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?
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.
A _______ is the smallest unit of memory, representing either 0 or 1.
Which type of memory loses its data when power is turned off?
Which type of memory loses its data when power is turned off?
The octal number system has a base of 10.
The octal number system has a base of 10.
Convert the binary number 1010
to its decimal equivalent.
Convert the binary number 1010
to its decimal equivalent.
In the hexadecimal number system, the letter 'A' represents the decimal value of _______.
In the hexadecimal number system, the letter 'A' represents the decimal value of _______.
Which of the following conversions is correct according to the shortcut methods?
Which of the following conversions is correct according to the shortcut methods?
When performing 2's complement, the bits to the right of the first '1' from the right changes.
When performing 2's complement, the bits to the right of the first '1' from the right changes.
What is the 2's complement representation of -26, assuming an 8-bit format?
What is the 2's complement representation of -26, assuming an 8-bit format?
In which representation, for a positive number, all three representations (Sign magnitude method, 1’s complement method, 2’s complement method) are same.
In which representation, for a positive number, all three representations (Sign magnitude method, 1’s complement method, 2’s complement method) are same.
A step-by-step procedure to solve a problem algorithm is called _______.
A step-by-step procedure to solve a problem algorithm is called _______.
A flowchart represents the steps of an algorithm using pictorial representation.
A flowchart represents the steps of an algorithm using pictorial representation.
Which of the following is an advantage of high-level programming languages?
Which of the following is an advantage of high-level programming languages?
Match the following language translators with their function:
Match the following language translators with their function:
Procedure-oriented programming revolves around the concept of objects.
Procedure-oriented programming revolves around the concept of objects.
Name three basic Boolean operators.
Name three basic Boolean operators.
Which logic gate gives an output of 1 only when all inputs are 1?
Which logic gate gives an output of 1 only when all inputs are 1?
A ________ gate is also called a universal gate because it can implement any Boolean function without needing other logic gates.
A ________ gate is also called a universal gate because it can implement any Boolean function without needing other logic gates.
An operating system acts as an interface between the user and the computer hardware.
An operating system acts as an interface between the user and the computer hardware.
Which of the following is NOT a primary function of an operating system?
Which of the following is NOT a primary function of an operating system?
What does 'LAN' stand for in the context of computer networks?
What does 'LAN' stand for in the context of computer networks?
A ________ topology connects all nodes to a main cable in a linear fashion.
A ________ topology connects all nodes to a main cable in a linear fashion.
In a star topology, failure of a single node always leads to network failure.
In a star topology, failure of a single node always leads to network failure.
Which network device operates by sending data only to the intended destination computer?
Which network device operates by sending data only to the intended destination computer?
What is the purpose of a MAC address?
What is the purpose of a MAC address?
Python is a ________ and open-source language.
Python is a ________ and open-source language.
Which of the following are all collection data types in Python?
Which of the following are all collection data types in Python?
Python literals can hold only numeric value.
Python literals can hold only numeric value.
What is the use of #
in python programming?
What is the use of #
in python programming?
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.
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.
Which loop do you used for sequential traversal in python?
Which loop do you used for sequential traversal in python?
Else section is not available in for
loop and while
loop in python.
Else section is not available in for
loop and while
loop in python.
What are the two modes in python programming?
What are the two modes in python programming?
________ refers to the spaces at the beginning of a code line in python.
________ refers to the spaces at the beginning of a code line in python.
Which function is used to display a string in double quotes in python?
Which function is used to display a string in double quotes in python?
String slicing is done in string, List and Tuple in python.
String slicing is done in string, List and Tuple in python.
When are you supposed to use universal gate when using boolean operator?
When are you supposed to use universal gate when using boolean operator?
Python data, is stored in a ________ called list.
Python data, is stored in a ________ called list.
Which of the following methods adds an item at the end of the list?
Which of the following methods adds an item at the end of the list?
You must always have ordered item when using dictionary.
You must always have ordered item when using dictionary.
Dictionary is also referred as
Dictionary is also referred as
The four primitive data structures are _______ float, string, and boolean.
The four primitive data structures are _______ float, string, and boolean.
Which of the following is the definition of Data?
Which of the following is the definition of Data?
Flashcards
What is Data?
What is Data?
Raw facts and figures that lack organization or context.
What is Information?
What is Information?
Processed data that is related, meaningful, and provides context.
What is Versatility?
What is Versatility?
The capability to perform different jobs efficiently.
What is Diligence?
What is Diligence?
Signup and view all the flashcards
What is the Input Unit?
What is the Input Unit?
Signup and view all the flashcards
What is the Output Unit?
What is the Output Unit?
Signup and view all the flashcards
ALU
ALU
Signup and view all the flashcards
Control Unit
Control Unit
Signup and view all the flashcards
What are Registers?
What are Registers?
Signup and view all the flashcards
What is Main Memory?
What is Main Memory?
Signup and view all the flashcards
What is a Keyboard?
What is a Keyboard?
Signup and view all the flashcards
What is a Mouse?
What is a Mouse?
Signup and view all the flashcards
What is a Scanner?
What is a Scanner?
Signup and view all the flashcards
What is a Microphone?
What is a Microphone?
Signup and view all the flashcards
What is OMR?
What is OMR?
Signup and view all the flashcards
What is a Barcode?
What is a Barcode?
Signup and view all the flashcards
What is a Printer?
What is a Printer?
Signup and view all the flashcards
What is an Impact Printer?
What is an Impact Printer?
Signup and view all the flashcards
What is a Non-Impact Printer?
What is a Non-Impact Printer?
Signup and view all the flashcards
What is a Monitor?
What is a Monitor?
Signup and view all the flashcards
What is a Projector?
What is a Projector?
Signup and view all the flashcards
What is a Plotter?
What is a Plotter?
Signup and view all the flashcards
What is Computer Memory?
What is Computer Memory?
Signup and view all the flashcards
What is a Bit?
What is a Bit?
Signup and view all the flashcards
What is a Nibble?
What is a Nibble?
Signup and view all the flashcards
What is a Byte?
What is a Byte?
Signup and view all the flashcards
What is Primary Memory?
What is Primary Memory?
Signup and view all the flashcards
What is Secondary Memory?
What is Secondary Memory?
Signup and view all the flashcards
What is RAM?
What is RAM?
Signup and view all the flashcards
What is ROM?
What is ROM?
Signup and view all the flashcards
What is the Base?
What is the Base?
Signup and view all the flashcards
What is Binary?
What is Binary?
Signup and view all the flashcards
What is Octal?
What is Octal?
Signup and view all the flashcards
What is Hexadecimal?
What is Hexadecimal?
Signup and view all the flashcards
What is Decimal?
What is Decimal?
Signup and view all the flashcards
How to get 1's complement
How to get 1's complement
Signup and view all the flashcards
How to get 2's complement
How to get 2's complement
Signup and view all the flashcards
What is an Algorithm?
What is an Algorithm?
Signup and view all the flashcards
What is Flowchart?
What is Flowchart?
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.