Section 1
Section 1
Basics of Computer
Fundamentals
Basics of Computer
Fundamentals
• How Computers Works.
• What is an Operating System?
• What is a Program?
• Low-level and High-Level Languages.
• Programming
Paradigms/Methodologies.
• Steps for Program Development and
Execution.
How Does A
Computer work…
Keywords:
1)Processor
2)Memory
Random Access Memory (RAM)
Read only memory(ROM)
3)I/O Devices
Keyboard
Mouse
Speakers etc
What is an
Operating System?
An Operating System (OS) is an
interface between a computer user and
computer hardware. An operating
system is software that performs all the
basic tasks like file management,
memory management, process
management, handling input and
output, and controlling peripheral
devices such as disk drives and
printers.
Some popular Operating Systems
include Linux Operating System,
Windows Operating System, VMS,
OS/400, AIX, z/OS, etc.
Program And Programming
languages.
○ A program is a set of instructions that process input, manipulate data, and
output a result.
○ To program a computer is the writing of instructions, statements, or
commands that instruct the computer on how to process data.
○ A programming language is a computer language programmers use to
develop software programs, scripts, or other sets of instructions for computers
to execute.
○ Although many languages share similarities, each has its own syntax. Once a
programmer learns the language’s rules, syntax, and structure, they write the
source code in a text editor or IDE.
○ Then, the programmer often compiles the code into machine language that
can be understood by the computer. Scripting languages, which do not require
a compiler, use an interpreter to execute the script.
Programmers
○ 1. Machine Language
○ 2. Assembly Language
○ Low-Level Programming Languages are very close to the machine and are also known as
Computer-Friendly Languages.
○ Low-Level Programming Languages are the hardest languages to understand by
programmers and need a really good knowledge of Computer Architecture and its
working.
1. Machine Language.
○ When you will take a deep look inside your computer, you will see nothing but just a series
of transistors, which are used for holding and releasing a charge.
○ In simple words, a Computer is a cluster of millions and millions of switches, which can be
either turned ON or OFF at a very high rate.
○ These two states (ON and OFF) can also be defined as 1 and 0 which is called Binary
Code.
○ A computer just understands the language of 0s and 1s (Binary Code).
○ Since Machine Language doesn’t need a Compiler, Interpreter, or any type of program to
convert its code. So, it is the fastest Programming Language.
○ However, working with Machine Language is not an easy task. As you need a good
understanding of the architecture of the CPU and its working.
○ Here is a simple example of Machine Language or Binary Code – 00000001 00010000
00000100 01000000.
Hope you
got
this!! XD
Assembly Language
○ It is another Low-Level Programming Language and the second closest language to the
Computer.
○ Assembly Language is slower as compared to Machine Language. However, it is very fast
when compared to High-Level Programming Languages (like – C, C++, and Java).
○ Unlike Machine Language, the Assembly Language need a program (called Assembler) to
convert its Assembly Code to Machine Code.
○ Programming in Assembly Language is comparatively much easier as compared to
working with Machine Language.
High Level Language
○ Paradigm is a model that has distinct features, frameworks, patterns, and style which
help you solve a particular problem.
○ In the field of computer science, new programming languages emerge from existing
languages and add, remove and combine features in a new way. The languages may
follow a particular paradigm or can be a combination of many paradigms.
○ Did you know that there are 256 programming languages? Yeah definetly all of them
wont be used for the same purpose.
○ Programming languages are tools and not all tools are good for all jobs. Some tasks are
easier to solve functionally. Some are clearly suited for Objected Oriented programming.
Others get simpler when you use constraint solving or pattern matching.
○ There are mainly 3 types of programming paradigms Procedural, Functional and Object
Oriented Programming.
Programming Paradigms
Procedural Programming
○ Specifies a series of well-structured steps and procedures to compose a
program.
○ Contains a systematic order of statement functions and commands to
complete a task.
Functional Programming
○ Writing a program only in pure functions i.e., never modify variables but only create new
ones as an output.
○ Used in a situation where we have to perform lots of different operations on the same set
of data like ML.
Programming Paradigms
NOTE:
One programming language can be of all 3 types like- Python.
Java Follows procedural and oobject-orientedboth types.
Static Vs Dynamic Languages.
○ Static typing, as is found in languages like Java, C, C++ and Go, is considered a relatively
risk-averse approach to coding, mainly since the type-checking process occurs at compile
time.
○ As such, these checks will catch things like missing functions, invalid type arguments, or a
mismatch between a data value and the type of variable it's assigned to before the
program even has a chance.
○ In dynamically-typed languages like Python, JavaScript, PHP, and Perl, type-checking
happens at runtime. Instead of halting operations, the compiler will ignore things like
invalid type arguments or mismatched data -- instead, type checking will occur regularly
during runtime.
○ If the type checker detects an error, it will alert the developer and give them an
opportunity to correct the code before the program crashes.
○ DEMO
Bits,Bytes,KB,MB,GB,TB,PB…
○ A bit is a binary digit, the smallest increment of data on a computer. A bit can hold only
one of two values: 0 or 1.
○ Because bits are so small, you rarely work with information one bit at a time. Bits are
usually assembled into a group of eight to form a byte. A byte contains enough
information to store a single ASCII character, like "h".
○ A kilobyte (KB) is 1,024 bytes, not one thousand bytes as might be expected, because
computers use binary (base two) math, instead of a decimal (base ten) system.
○ Computer storage and memory is often measured in megabytes (MB) and gigabytes (GB).
A medium-sized novel contains about 1 MB of information. 1 MB is 1,024 kilobytes, or
1,048,576 (1024x1024) bytes, not one million bytes.
○ Similarly, one 1 GB is 1,024 MB, or 1,073,741,824 (1024x1024x1024) bytes. A terabyte
(TB) is 1,024 GB; 1 TB is about the same amount of information as all of the books in a
large library, or roughly 1,610 CDs worth of data. A petabyte (PB) is 1,024 TB. 1 PB of
data, if written on DVDs, would create roughly 223,100 DVDs, i.e., a stack about 878 feet
tall, or a stack of CDs a mile high. Indiana University is now building storage systems
capable of holding petabytes of data. An exabyte (EB) is 1,024 PB. A zettabyte (ZB) is
1,024 EB. Finally, a yottabyte (YB) is 1,024 ZB
Course Progress
1 2 3 4
Basics of Computer Fundamentals Of
Fundamentals Cpp
Thank you…
Section 2 Coming up…