Sunteți pe pagina 1din 7

1. Computer --- it is a Device (built for one purpose - to do things for us).

You can use a computer


to type documents, send email, play games, and browse the Web. You can also use it to edit or create
presentations, and even videos
Device = a thing made for a particular purpose, especially a piece of mechanical or electronic equipment.
A device/machine is something that reduced our efforts in doing some work.
2. Computer --- can store data, retrieve the store data and process the data. A giant device that can
 Receive data from the external world. data = numbers. images, sounds can also be
represented using numbers and hence fed to a computer --- Input
 Stores the data --- Storage
 Perform calculations on the data it receives --- Processing
 Send the results back to the external world --- Output
 What calculations to perform: determined by a program that must be loaded in the
computer
3. But we need to speak their language to describe what we want to be done (learn programming)
4. Computer --- Hardware + Software
5. Hardware is any part of your computer that has a physical structure (form), such as the keyboard or
mouse. It also includes all of the computer's internal parts, which you can see in the image below

6. The word computer refers to an object that can accept some input and produce some output
*** Input --- Devices that allow us to enter Data (keyboard, mouse --- mouse click is also an input).
capturing or acquiring the information or accepting data or information
*** Output --- Devices that produces the Output (Monitor/Screen --- In recent times printer)
*** Input and Output are the ways we interact with our computer
*** Program/Code --- set of instructions for a computer to perform (tell “what to do”)
Software --- Software is set of programs combined that tells the computer what to do and how to do it
Calculator is a Software, Peforming Addition on it is a program, same in case of Subtraction,
Multiplication and Division.
Function (In computer terms) --- Functions perform a specific task. Functions usually "take in"
data/input, process it, and "return" a result/output (which can also be used as input for another function
--- if needed). Once a function is present, it can be used over and over and over again. Based on DRY(Don’t
Repeat Yourself) concept.
Eg: Blender ---- It has many functions --- Chop, Paste, Grind --- It takes vegetables as input, process it using
one function and produces the output
More Into How Computers Work ?
Imagine you don’t know any language. How do you communicate something to someone? --- SIGNAL. Yes
that is what happens with computers as well.
1. A computer is a machine that requires electricity or current to work
2. Circuits is a path between two points through which current is carried (requires three things ---
source/supply of current, load which uses this current and the wire which carries this current
between two points). Digital circuits interpret current as numbers. Voltage above 3.5 volt =
number 1 − Voltage between 0 and 0.5 volt = number 0 − Circuit designed so that voltage will
never be between 0.5 and 3.5 volt, hence no ambiguity
*** Voltage causes Current. It is the force (make someone do something) that makes current move
through the wire.
3. transistors are used in computer --- which can store/free electricity as needed. They are stored as
1 (having current) and 0 (no current)
4. So, represent all input given to computer using only 1's and 0's – Also called "Bits": "Binary digits"
Bit = 1 Transistor/wire
byte = 8 bits
Example: a. 25 in Decimal = 11001 in binary. Use a 5 transistors/wires. Make the 1st, 2nd, 5th hold 5V
and 0V on 3rd, 4th
b. 8-bit representation of the number 3 will be : 0000 0011. How is that achieved in hardware? Keep 8
transistors side-by-side. Make the first 6 transistors hold 0V and the next 2 transistors hold 5V
5. The computer reads these series of 1's or 0's, compares them with the protocols(set of rules for
communication) already defined(by us) and then understands what we are trying to say to
computer.
CPU and Memory

CPU --- Central Processing Unit (Processor) --- Runs the programs. It only asks one question What Next
? If your computer is rated at 3.0 Gigahertz, it means that the CPU will ask “What next?” three billion times
per second

*** Typically, the program is put into a storage area accessible to the computer. The computer gets one
instruction and performs it and then gets the next instruction.
 The Main Memory (Random Access Memory) is used to store information that the CPU needs to process.
The information stored in the main memory vanishes (is lost) when the computer is turned off.
 The Secondary Memory is also used to store information - lasts until deleted. Examples of secondary
memory are disk drives or flash memory (typically found in USB sticks and portable music players).
*** In general, Programs are stored in secondary memory permanently and during the time of running
the program, it is loaded into the main memory and processed by CPU.
16 GB RAM --- main memory 1 TB Hard Disk --- secondary memory

What next ?

As a programmer you will mostly be “talking” to the CPU and telling it what to do next. Sometimes you
will tell the CPU to use the main memory, secondary memory, or the input/output devices. You need to
be the person who answers the CPU’s “What next?” question. But it would be very uncomfortable to
shrink you down to 5mm tall and insert you into the computer just so you could issue a command three
billion times per second. So instead, you must write down your instructions in advance. We call these
stored instructions a program and the act of writing these instructions down and getting the instructions
to be correct is called programming.
Computer and Car Comparision
1. CPU --- Under the hood --- holds everything needed for the operation
2. Programmer --- Driver --- they tell what to do
3. Power Supply --- Engine --- Converts Energy Sources to Power
*** Energy --- Capacity(quantity) to do Work --- 1 hour of charging to run laptop for 3 hours, Power ---
rate of doing work (A computers Processor Speed determines how fast the computer work).
How much total energy can the system store?
How much power can it deliver at any moment?
Energy is what one delivers and Power is the speed at which it is delivered.
Translators --- Compiler and Interpreter

We generally write instructions in High-Level Language (human understandable language to read and
write --- Example Java and Python). The actual hardware inside the Central Processing Unit (CPU) does
not understand any of these high-level languages. The CPU understands a language we call machine
language. Machine language is very simple and frankly very tiresome to write because it is represented
all in zeros and ones: 001010001110100100101010000001111
11100110000011101010010101101101 ...
Machine language seems quite simple, given that there are only zeros and ones, but its syntax is even
more complex. So very few programmers ever write machine language. Instead we build various
translators to allow programmers to write in high-level languages and these translators convert the
programs to machine language for actual execution by the CPU.
Translator --- takes a program written in high level language as input and converts it into a program in
machine language as output. It also detects and reports the error during translation. Below are the two
types of translators
i. Compiler --- translates the entire program and also reports the errors in source program
encountered during the translation.
ii. Interpreter --- translates line by line and reports the error once it encountered during the
translation process
iii. Assembler --- translate the assembly language code into machine language code
The result of compilation: An executable file --- which can be processed by the computer and produce
output.
*** Interface --- The place where user interacts with machine. (In general, it is a place where a user
interacts with something). Example incluse Monitor is a interface where we interact with the computer.
Software --- Software is set of programs combined that tells the computer what to do and how to do it
Calculator is a Software, Peforming Addition on it is a program, same in case of Subtraction,
Multiplication and Division. There are two kinds of Software
1. System Software --- Software which is used to run Computer Hardware which means it acts as a
interface between computer hardware and user. It also acts as interface between computer
hardware and Application Software.
Example is Windows (operating system) is system software, and the Office Suite(Word, Powerpoint,
Excel, etc) is application software.
The two main types of system software are the operating system and utility software --- the software
installed with the operating system or seprately, to help analyze and maintain a computer. Examples
include AntiVirus
*** Utility --- (product/service) which has useful features, or something useful for carrying activities.
General Examples include gas, water, electricity, public transport and telephone.
2. Application Software --- Software that allows users to do things is called Application Software.
create documents (e.g. Microsoft Word), edit pictures (e.g. Adobe Photoshop), browse the Internet
(e.g. Microsoft Internet Explorer/Chrome), or check their e-mail (e.g. Microsoft Outlook/gmail)
are considered application software
*** Process --- Instance (single and unique unit of something --- copy) of a program running on the
computer.
Operating System
Interface between computer user and computer hardware. Without OS, computer is useless. It is
responsible for how everything else works on the computer (right after turning the computer on to
turning it off). allows the user to work on the computer without having to know all the details about how
the hardware works (we don’t know how car is built, how it works internally --- but with the help of
Interface provided which is steering and brake control we drive the car).
An operating system is used for
1. Device Management : Operating System is responsible for managing all the Input and Output
Devices attached to the computer. OS recognizes input from the keyboard, sending output to
the display screen. For every device type, a device driver program is included in the Operating
System.
2. Process Management : CPU is the active resource which does all the processing tasks. So,
Operating System takes care of creating, suspending(blocking), executing, terminating and
destroying the processes.
3. Memory Management : Operating System is responsible for allocating and deallocating the
memory for the processes.
4. File Management : Operating System is responsible for creating and deleting files(object/thing
on a computer that stores data and available to anyone who needs it)/directories and keeping
track of files and directories on the disk
*** Just like an office file, information in a computer file could consist of basically anything
5. Resources Management : Operating System is responsible for allocation and deallocation of the
resources to the requesting processes [Process requesting for CPU/Memory/Input,Output
devices].
6. *** Communications : There are times where processes need to communic ate with each other to
exchange information. It may be between processes running on the same computer or running
on different computers. The OS provides these services to application programs, making inter-
process communication possible.

*** ASCII is the acronym for the American Standard Code for Information Interchange. It is a code for
representing 128 English characters as numbers, with each letter assigned a number from 0 to 127. For
example, the ASCII code for uppercase M is 77. Most computers use ASCII codes to represent text, which
makes it possible to transfer data from one computer to another.

S-ar putea să vă placă și