CHAPTER 1- COMPUTER BASICS
● PARTS OF CPU-
○ ALU- Performs arithmetic and logical operations. ‘
○ CU- Acts as a supervisor by controlling and guiding memory operation
○ Registers- small units of data holding, stores important processing info during
processing.
● MEMORY
○ Refers to where data is stored temp or perm.
● 2 TYPES-
● Primary- stores information and data during processing.
○ RAM-
■ AKA working memory
■ Used to hold active information
■ Volatile
■ DRAM- made from transistors
■ SRAM- made from flip flops (faster than DRAM)
○ ROM-
■ Holds info given by manufacturer (check hardware etc)
■ AKA Firmware
■ NON VOLATILE
■ PROM- Programmable ROM
■ EPROM- Erasable PROM
■ EEPROM- Electrically EPROM
■ Flash EPROM- faster EEPROM
● Secondary- holds data permanently.
○ CD DVD
○ Pen drive etc
● SOFTWARE
○ SYSTEM-
■ OS-
● Acts as an interface between the user and the system.
● Types- Single user, multi user, time sharing ETC.
■ Language Processors-
■ Turns source code to object code
■ Types-
● ASSEMBLER-
○ Converts assembly language to machine language
● INTERPRETER-
○ Converts line by line
● COMPILER
○ APPLICATION-
○ Necessary to carry out operations for a specified application
○ TYPES-
■ Packages-
● General application software that can be used in many ways-
(ex Word processing, spreadsheet)
■ Software Libraries-
● Predefined suite of data/snippet reusable to fit many purposes.
Used to develop new software.
■ Business-
● Tailor made for specific purposes. (ex- payroll, reservation,
inventory)
■ Utilities-
● Assist the computer by performing housekeeping functions like
backing up disk or scanning and cleaning viruses.
CHAPTER 2- DATA REPRESENTATION
● DECIMAL SYSTEM-
○ Made from 10 literals (0-9)
○ AKA Base-10
● BINARY SYSTEM-
○ Made from 2 literals (0-2)
○ AKA Base-2
● OCTAL SYSTEM-
○ Made from 8 literals (0-7)
○ AKA Base-8
● CONVERSIONS -
○ DECIMAL TO BINARY-
■ Repeated division with 2.
■ Write remainders from down to up
○ BINARY TO DECIMAL-
■ Position=n
■ Do 2n for each positions
■ Add all
○ DECIMAL TO OCTAL-
■ Repeated division with 8.
■ Write remainders from down to up.
○ OCTAL TO DECIMAL
■ Position=n
■ Do 8n for each positions
■ Add all
○ DECIMAL TO HEX-
■ Repeated division with 16.
■ Write remainders from down to up
○ HEX TO DECIMAL
■ Position=n
■ Do 2n for each positions and add all
● BINARY ADDITION-
○ 0+0=0
○ 0+1=1
○ 1+0=1
○ 1+1=10
○ 1+1+1=11
● ASCII-
○ American standard code for information exchange
○ 7 bit code
● ISCII-
○ Indian standard code for information interchange
● UNICODE-
○ Defines all the characters needed for writing in one place.
○ Superset of all character sets
■ UTF-8 is an encoding scheme
CHAPTER 3- BOOLEAN LOGIC
● BASIC-
○ George Bool in 1854
○ AKA Switching algebra
● LOGICAL OPERATORS
○ NOT
■ Inverses 0 to 1 and vice versa
○ AND
■ 0.0=0
■ 0.1=0
■ 1.0=0
■ 1.1=1
○ OR
■ 0+0=0
■ 0+1=1
■ 1+0=1
■ 1+1=1
○ Truth table ez
● LOGIC GATES-
○ Inverter(NOT)
■ Basic NOT signal
○ OR
■ Basic OR signal
○ AND
■ Basic AND signal
○ NOR
■ Converted OR
○ NAND
■ Converted AND
○ XOR
■ 1 for odd number of input 1
○ XNOR
■ 1 for even number of input 1
IMPORTANT PYTHON STUFF-
●PATTERNS- STAR(*)
● For normal pyramid swap i+1 with i,n.
● Inverse Pyramid
● n=5
for i in range(n):
for j in range(i+1):
print("", end=" ")
for j in range(i,n):
print("*", end=" ")
print()
● Inverse left angled triangle
● n=5
for i in range(n):
for j in range(i,n):
print("*", end=" ")
print()
● Right Angled
● Swap i,n and i+1 for inversing
● n=5
for i in range(n):
for j in range(i,n):
print(" ", end="")
for j in range(i+1):
print("*", end="")
print()
● Left angled triangle(increasing)
○ n=5
for i in range(n):
for j in range(i+1):
print("*", end=" ")
print()
● NUMBER
● Increasing number, decreasing triangle
● Decreasing number, put p=5, decrement it by 1
● n=5
p=1
for i in range(n):
for j in range(i+1):
print(p, end="")
p+=1
print()