SlideShare a Scribd company logo
1 of 85
Instructor: Mark John Lado
In the connection of C programming and
flowcharting, in this topic you will learn on
how to use algorithms.
Stay focus and study hard!
You will be able to
1. define pseudo code
2. write pseudo code on a specific problem
3. know the importance of algorithms
Objectives
Pseudo code is an informal high-level description
of the operating principle of a computer program
or other algorithm. It uses the structural
conventions of a normal programming language,
but is intended for human reading rather than
machine reading.
Pseudo code
#include <stdio.h>
main()
{
printf("Hello Worldn");
getch();
}
C / C++ Code and Pseudo Code
Start
Header files
Opening bracket
display HelloWorld
Get the character
Closing bracket
End
#include <stdio.h>
main()
{
int x = 1;
if (x == 1)
printf("x is equal to one.");
else
printf(“x is not equal to one");
getch();
}
Write the pseudo code
Start
Header files
Opening bracket
Declaring x as integer and is equal to one
if x is equal to one then
print the statement x is equal to one
else
print the statement x is not equal to one
Get the character
Closing bracket
End
Pseudo code of the given previous code
You already had a fundamentals of writing an
algorithms. What’s next?
In the next topic you will be introduced on
how computers store data.
Stay in focus!
Heads up!
Binary Number System
1010001110
You will be able to
1. determine the function of 1 and 0
2. recognize different types of number
systems as they relate to computers.
3. add and subtract in binary
4. convert values from decimal, binary
Objectives
Concept:
All data that is stored in a computer is converted to
sequences of Zero’s and One’s.
Binary Number Systems
A computer’s memory is divided into tiny
storage locations known as bytes. One
byte is only enough memory to store a
letter of the alphabet or a small number.
Binary Number Systems
In order to do anything meaningful, a
computer has to have lots of bytes. Most
computers today have millions, or even
billions, of bytes of memory.
Binary Number Systems
Each byte is divided into eight smaller
storage locations known as bits. The term
bits stands for binary digit. Computer
scientists usually think of bits as tiny
switches that can be either on or off.
Binary Number Systems
Bits aren’t actual “switches,” however, at
least not in the conventional sense. In
most computer systems, bits are tiny
electrical components that can hold
either a positive or a negative charge.
Binary Number Systems
Computer scientists think of a positive
charge as a switch in the on position, and
a negative charge as a switch in the off
position.
Binary Number Systems
Binary Number Systems
Figure shows the way that a computer
scientist might think of a byte of memory:
as a collection of switches that are each
flipped to either the on or off position.
Binary Number Systems
When a piece of data is stored in a byte,
the computer sets the eight bits to an
on/off pattern that represents the data.
Binary Number Systems
A bit can be used in a very limited way to
represent numbers. Depending on
whether the bit is turned on or off, it can
represent one of two different values.
Storing Numbers
In computer systems, a bit that is turned
off represents the number 0 and a bit that
is turned on represents the number 1. This
corresponds perfectly to the binary
numbering system.
Storing Numbers
In the binary numbering system (or binary,
as it is usually called) all numeric values
are written as sequences of 0s and 1s.
Storing Numbers
Here is an example of a number that is
written in binary:
10011101
Storing Numbers
The position of each digit in a binary
number has a value assigned to it. Starting
with the rightmost digit and moving left,
the position values are 2^0 , 2^1 , 2^2 ,
2^3 , and so forth.
Storing Numbers
Storing Numbers
Next figure shows the same diagram with
the position values calculated. Starting
with the rightmost digit and moving left,
the position values are 1, 2, 4, 8, and so
forth.
Storing Numbers
Storing Numbers
To determine the value of a binary number
you simply add up the position values of
all the 1s. For example, in the binary
number 10011101, the position values of
the 1s are 1, 4, 8, 16, and 128.
Storing Numbers
The sum of all of these position values is
157. So, the value of the binary number
10011101 is 157.
Storing Numbers
Storing Numbers
How? Just plot the table of the binary
values from 1, 2, 4, 8, 16, 32, 64 and so
forth below on the binary given.
Example:
1 0 1 1 1 0
32 16 8 4 2 1
Binary to decimal conversion – Simple way
Cancel all Zeros and Add all Ones
Then find the sum of 32, 8, 4 and 2.
Example:
1 0 1 1 1 0
32 16 8 4 2 1
Binary to Decimal conversion
• 101110
• 101010
• 11100101
• 101111011
• 1001011110
Try to convert, binary to decimal.
• 101110 - 46
• 101010 - 42
• 11100101 - 229
• 101111011 - 379
• 1001011110 - 606
Try to convert, binary to decimal.
Decimal to Binary Conversion
How? Just plot the table of the binary
values from 1, 2, 4, 8, 16, 32, 64 and so
forth.
Example: 46 is the given value
64 32 16 8 4 2 1
0 1 0 1 1 1 0
Decimal to Binary Conversion
• 128
• 201
• 134
• 96
• 52
Try to convert, decimal to binary .
• 128 – 1 0 0 0 0 0 0 0
• 201 – 1 1 0 0 1 0 0 1
• 134 – 1 0 0 0 0 1 1 0
• 96 – 1 1 0 0 0 0 0
• 52 – 1 1 0 1 0 0
Try to convert, decimal to binary .
In binary addition there is a magic table
(rule).
1 + 1 = 0 carry 1
1 + 0 = 1
0 + 1 = 1
0 + 0 = 0
Binary Addition
How to add binary numbers?
Example:
1 0 1 1
+ 0 1 0 0
1
Binary Addition
How to add binary numbers?
Example:
1 0 1 1
+ 0 1 0 0
1 1
Binary Addition
How to add binary numbers?
Example:
1 0 1 1
+ 0 1 0 0
1 1 1
Binary Addition
How to add binary numbers?
Example:
1 0 1 1
+ 0 1 0 0
1 1 1 1
Binary Addition
Another example with carry.
Binary Addition
How to add binary numbers?
Example:
1 0 1 1 0
+ 0 1 1 0 1
1 0 0 0 1 1
Binary Addition
How to check if it is correct?
32 16 8 4 2 1
1 0 1 1 0
+ 0 1 1 0 1
1 0 0 0 1 1
Binary Addition
And add all 1’s and cross-out all 0’s.
32 16 8 4 2 1
1 0 1 1 0 - 22
+ 0 1 1 0 1 - 13
1 0 0 0 1 1 - 35
Binary Addition
Prepare ½ cross wise clean yellow pad
A.1 1 1 1 + 10101 =
B. 1011111 + 10111 =
C. 11011011 + 11010111 =
D.1110111111 + 1101100111 =
Binary Addition
In binary subtraction there is a magic table
(rule).
Binary Subtraction
Example # 1.
Binary Subtraction
How to check if it is correct? Simply plot
the position values at the top.
Binary Subtraction
Binary Subtraction
Binary Subtraction
Binary Subtraction
Binary Subtraction
Example with a carry.
Binary Subtraction
Example with a carry.
Binary Subtraction
Example with a carry.
Binary Subtraction
Example with a carry.
Try to check if
it is correct.
Binary Subtraction
Another example with more carries.
Binary Subtraction
Another example with more carries.
Binary Subtraction
Another example with more carries.
Binary Subtraction
Another example with more carries.
Binary Subtraction
Checking….
Binary Subtraction
Checking….
Binary Subtraction
Prepare ½ cross wise clean yellow pad
A.101 – 011 =
B. 1111 – 0101 =
C. 10101 – 01010 =
D.11101 – 10110 =
Binary Subtraction
Developed in the 1830s and 1840s by
Samuel Morse (1791-1872) and other
inventors, the telegraph revolutionized
long-distance communication. It worked
by transmitting electrical signals over a
wire laid between stations.
Morse Code & theTelegraph
In addition to helping invent the
telegraph, Samuel Morse developed a
code (bearing his name) that assigned a
set of dots and dashes to each letter of
the English alphabet and allowed for the
simple transmission of complex messages
across telegraph lines.
Morse Code & theTelegraph
In 1844, Morse sent his first telegraph
message, from Washington, D.C., to
Baltimore, Maryland; by 1866, a
telegraph line had been laid across the
Atlantic Ocean from the U.S. to Europe.
Morse Code & theTelegraph
Although the telegraph had fallen out of
widespread use by the start of the 21st
century, replaced by the telephone, fax
machine and Internet, it laid the
groundwork for the communications
revolution that led to those later
innovations.
Morse Code & theTelegraph
- dot
- det
Example
B
S
I
S
Example
How
The class is divided into 4 groups,
each group must prepare 5 messages
using the Morse code. Write the
encrypted and decrypted messages
on a clean ¼ yellow pad paper.
Activity – Sender and Receiver
Prepare ½ Crosswise
CleanYellow Pad Paper
Pseudo code
#include <stdio.h>
main()
{
int x = 1;
if (x == 1)
printf("x is equal to one.");
else
printf(“x is not equal to one");
getch();
}
1. Write the pseudo code
#include <stdio.h>
main()
{
float prelim, midterm, semiFinal, Final, Sum, average;
clrscr();
printf(“prelim:”);
scanf(“%f”, &prelim);
printf(“midterm :”);
scanf(“%f”, &midterm);
printf(“semiFinal :”);
scanf(“%f”, &semiFinal );
printf(“Final :”);
scanf(“%f”, & );
sum = (prelim + midterm + semiFinal + Final);
printf(“Total grade: %f”, sum);
average = (sum/4);
printf(“Total Average: %f”, average );
getch();
}
2. Write the pseudo code
int x = 20;
int y = 10;
If (x < y) {
system.out.println(“x is less than y”);
}
If (x == y) {
system.out.println(“x is equal to y”);
}
If (x > y) {
system.out.println(“x is less greater than y”);
}
3. Write the pseudo code
Prepare ½ cross wise clean yellow pad
• 1101110
• 1011010
• 111010101
• 1011110111
• 10011011110
Try to convert, binary to decimal.
• 228
• 301
• 534
• 196
• 152
Try to convert, decimal to binary .
A.1 01 1 1 + 10101 =
B.1011111 + 101111 =
C.11011011 + 110101111 =
D.11101111111 + 11011001111 =
Binary Addition
A.1011 – 0110 =
B.11101 – 01111 =
C.101101 – 011010 =
D.111101 – 101110 =
Binary Subtraction
Convert into Morse code.
The quick brown fox jumps over a lazy dog.
Morse Code
Prepare for Midterm Exam

More Related Content

What's hot

Number system.pdf
Number system.pdfNumber system.pdf
Number system.pdfDeepuGuna
 
Data representation
 Data representation Data representation
Data representationAshraf Miraz
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representationekul
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representationAnil Pokhrel
 
Binary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalBinary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalUthraSowrirajan1
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006arunachalamr16
 
Representation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarRepresentation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarSivakumar R D .
 
Data Representation
Data RepresentationData Representation
Data RepresentationRick Jamil
 

What's hot (18)

Number system.pdf
Number system.pdfNumber system.pdf
Number system.pdf
 
Data representation
 Data representation Data representation
Data representation
 
Number System
Number SystemNumber System
Number System
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
Binary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalBinary, Decimal and Hexadecimal
Binary, Decimal and Hexadecimal
 
Data representation
Data representationData representation
Data representation
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
 
Data representation
Data representationData representation
Data representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Data representation
Data representationData representation
Data representation
 
Representation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarRepresentation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.Sivakumar
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
05 multiply divide
05 multiply divide05 multiply divide
05 multiply divide
 
Number System and Boolean Algebra
Number System and Boolean AlgebraNumber System and Boolean Algebra
Number System and Boolean Algebra
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Codes r005
Codes  r005Codes  r005
Codes r005
 

Similar to Introduction to Computing

data representation
 data representation data representation
data representationHaroon_007
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawabAmmar_n
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdfmiftah88
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptxbmangesh
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversionsSusantha Herath
 
Data types
Data typesData types
Data typesgavhays
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxMinahilUmar1
 
Chapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptChapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptKalGetachew2
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfshubhangisonawane6
 
Lecture 2 coal sping12
Lecture 2 coal sping12Lecture 2 coal sping12
Lecture 2 coal sping12Rabia Khalid
 
IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015Aron Kondoro
 

Similar to Introduction to Computing (20)

chap1.pdf
chap1.pdfchap1.pdf
chap1.pdf
 
chap1.pdf
chap1.pdfchap1.pdf
chap1.pdf
 
chap1.pdf
chap1.pdfchap1.pdf
chap1.pdf
 
data representation
 data representation data representation
data representation
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
Number system
Number systemNumber system
Number system
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
Data types
Data typesData types
Data types
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
Chapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptChapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.ppt
 
Number system
Number systemNumber system
Number system
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
 
Number system
Number system  Number system
Number system
 
Lecture 2 coal sping12
Lecture 2 coal sping12Lecture 2 coal sping12
Lecture 2 coal sping12
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015
 

More from Mark John Lado, MIT

Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...Mark John Lado, MIT
 
Optimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology DesignOptimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology DesignMark John Lado, MIT
 
Embedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdfEmbedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdfMark John Lado, MIT
 
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...Mark John Lado, MIT
 
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...Mark John Lado, MIT
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John Lado3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John Lado2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...Mark John Lado, MIT
 
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...Mark John Lado, MIT
 
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...Mark John Lado, MIT
 
Dart Programming Language by Mark John Lado
Dart Programming Language by Mark John LadoDart Programming Language by Mark John Lado
Dart Programming Language by Mark John LadoMark John Lado, MIT
 
Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...Mark John Lado, MIT
 
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...Mark John Lado, MIT
 
IT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John LadoIT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John LadoMark John Lado, MIT
 
IT Security and Management - Security Policies
IT Security and Management - Security PoliciesIT Security and Management - Security Policies
IT Security and Management - Security PoliciesMark John Lado, MIT
 
Systems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADOSystems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADOMark John Lado, MIT
 
IT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John LadoIT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John LadoMark John Lado, MIT
 

More from Mark John Lado, MIT (20)

Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
 
Optimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology DesignOptimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology Design
 
Embedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdfEmbedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdf
 
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
 
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado
 
3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John Lado3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John Lado
 
1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado
 
2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John Lado2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John Lado
 
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
 
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
 
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
 
Dart Programming Language by Mark John Lado
Dart Programming Language by Mark John LadoDart Programming Language by Mark John Lado
Dart Programming Language by Mark John Lado
 
What is CRUD in TPS?
What is CRUD in TPS?What is CRUD in TPS?
What is CRUD in TPS?
 
Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...
 
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
 
IT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John LadoIT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John Lado
 
IT Security and Management - Security Policies
IT Security and Management - Security PoliciesIT Security and Management - Security Policies
IT Security and Management - Security Policies
 
Systems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADOSystems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADO
 
IT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John LadoIT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John Lado
 

Recently uploaded

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 

Introduction to Computing

  • 2. In the connection of C programming and flowcharting, in this topic you will learn on how to use algorithms. Stay focus and study hard!
  • 3. You will be able to 1. define pseudo code 2. write pseudo code on a specific problem 3. know the importance of algorithms Objectives
  • 4. Pseudo code is an informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a normal programming language, but is intended for human reading rather than machine reading. Pseudo code
  • 5. #include <stdio.h> main() { printf("Hello Worldn"); getch(); } C / C++ Code and Pseudo Code Start Header files Opening bracket display HelloWorld Get the character Closing bracket End
  • 6. #include <stdio.h> main() { int x = 1; if (x == 1) printf("x is equal to one."); else printf(“x is not equal to one"); getch(); } Write the pseudo code
  • 7. Start Header files Opening bracket Declaring x as integer and is equal to one if x is equal to one then print the statement x is equal to one else print the statement x is not equal to one Get the character Closing bracket End Pseudo code of the given previous code
  • 8. You already had a fundamentals of writing an algorithms. What’s next? In the next topic you will be introduced on how computers store data. Stay in focus! Heads up!
  • 10. You will be able to 1. determine the function of 1 and 0 2. recognize different types of number systems as they relate to computers. 3. add and subtract in binary 4. convert values from decimal, binary Objectives
  • 11. Concept: All data that is stored in a computer is converted to sequences of Zero’s and One’s. Binary Number Systems
  • 12. A computer’s memory is divided into tiny storage locations known as bytes. One byte is only enough memory to store a letter of the alphabet or a small number. Binary Number Systems
  • 13. In order to do anything meaningful, a computer has to have lots of bytes. Most computers today have millions, or even billions, of bytes of memory. Binary Number Systems
  • 14. Each byte is divided into eight smaller storage locations known as bits. The term bits stands for binary digit. Computer scientists usually think of bits as tiny switches that can be either on or off. Binary Number Systems
  • 15. Bits aren’t actual “switches,” however, at least not in the conventional sense. In most computer systems, bits are tiny electrical components that can hold either a positive or a negative charge. Binary Number Systems
  • 16. Computer scientists think of a positive charge as a switch in the on position, and a negative charge as a switch in the off position. Binary Number Systems
  • 18. Figure shows the way that a computer scientist might think of a byte of memory: as a collection of switches that are each flipped to either the on or off position. Binary Number Systems
  • 19. When a piece of data is stored in a byte, the computer sets the eight bits to an on/off pattern that represents the data. Binary Number Systems
  • 20. A bit can be used in a very limited way to represent numbers. Depending on whether the bit is turned on or off, it can represent one of two different values. Storing Numbers
  • 21. In computer systems, a bit that is turned off represents the number 0 and a bit that is turned on represents the number 1. This corresponds perfectly to the binary numbering system. Storing Numbers
  • 22. In the binary numbering system (or binary, as it is usually called) all numeric values are written as sequences of 0s and 1s. Storing Numbers
  • 23. Here is an example of a number that is written in binary: 10011101 Storing Numbers
  • 24. The position of each digit in a binary number has a value assigned to it. Starting with the rightmost digit and moving left, the position values are 2^0 , 2^1 , 2^2 , 2^3 , and so forth. Storing Numbers
  • 26. Next figure shows the same diagram with the position values calculated. Starting with the rightmost digit and moving left, the position values are 1, 2, 4, 8, and so forth. Storing Numbers
  • 28. To determine the value of a binary number you simply add up the position values of all the 1s. For example, in the binary number 10011101, the position values of the 1s are 1, 4, 8, 16, and 128. Storing Numbers
  • 29. The sum of all of these position values is 157. So, the value of the binary number 10011101 is 157. Storing Numbers
  • 31. How? Just plot the table of the binary values from 1, 2, 4, 8, 16, 32, 64 and so forth below on the binary given. Example: 1 0 1 1 1 0 32 16 8 4 2 1 Binary to decimal conversion – Simple way
  • 32. Cancel all Zeros and Add all Ones Then find the sum of 32, 8, 4 and 2. Example: 1 0 1 1 1 0 32 16 8 4 2 1 Binary to Decimal conversion
  • 33. • 101110 • 101010 • 11100101 • 101111011 • 1001011110 Try to convert, binary to decimal.
  • 34. • 101110 - 46 • 101010 - 42 • 11100101 - 229 • 101111011 - 379 • 1001011110 - 606 Try to convert, binary to decimal.
  • 35. Decimal to Binary Conversion
  • 36. How? Just plot the table of the binary values from 1, 2, 4, 8, 16, 32, 64 and so forth. Example: 46 is the given value 64 32 16 8 4 2 1 0 1 0 1 1 1 0 Decimal to Binary Conversion
  • 37. • 128 • 201 • 134 • 96 • 52 Try to convert, decimal to binary .
  • 38. • 128 – 1 0 0 0 0 0 0 0 • 201 – 1 1 0 0 1 0 0 1 • 134 – 1 0 0 0 0 1 1 0 • 96 – 1 1 0 0 0 0 0 • 52 – 1 1 0 1 0 0 Try to convert, decimal to binary .
  • 39. In binary addition there is a magic table (rule). 1 + 1 = 0 carry 1 1 + 0 = 1 0 + 1 = 1 0 + 0 = 0 Binary Addition
  • 40. How to add binary numbers? Example: 1 0 1 1 + 0 1 0 0 1 Binary Addition
  • 41. How to add binary numbers? Example: 1 0 1 1 + 0 1 0 0 1 1 Binary Addition
  • 42. How to add binary numbers? Example: 1 0 1 1 + 0 1 0 0 1 1 1 Binary Addition
  • 43. How to add binary numbers? Example: 1 0 1 1 + 0 1 0 0 1 1 1 1 Binary Addition
  • 44. Another example with carry. Binary Addition
  • 45. How to add binary numbers? Example: 1 0 1 1 0 + 0 1 1 0 1 1 0 0 0 1 1 Binary Addition
  • 46. How to check if it is correct? 32 16 8 4 2 1 1 0 1 1 0 + 0 1 1 0 1 1 0 0 0 1 1 Binary Addition
  • 47. And add all 1’s and cross-out all 0’s. 32 16 8 4 2 1 1 0 1 1 0 - 22 + 0 1 1 0 1 - 13 1 0 0 0 1 1 - 35 Binary Addition
  • 48. Prepare ½ cross wise clean yellow pad A.1 1 1 1 + 10101 = B. 1011111 + 10111 = C. 11011011 + 11010111 = D.1110111111 + 1101100111 = Binary Addition
  • 49. In binary subtraction there is a magic table (rule). Binary Subtraction
  • 50. Example # 1. Binary Subtraction
  • 51. How to check if it is correct? Simply plot the position values at the top. Binary Subtraction
  • 56. Example with a carry. Binary Subtraction
  • 57. Example with a carry. Binary Subtraction
  • 58. Example with a carry. Binary Subtraction
  • 59. Example with a carry. Try to check if it is correct. Binary Subtraction
  • 60. Another example with more carries. Binary Subtraction
  • 61. Another example with more carries. Binary Subtraction
  • 62. Another example with more carries. Binary Subtraction
  • 63. Another example with more carries. Binary Subtraction
  • 66. Prepare ½ cross wise clean yellow pad A.101 – 011 = B. 1111 – 0101 = C. 10101 – 01010 = D.11101 – 10110 = Binary Subtraction
  • 67. Developed in the 1830s and 1840s by Samuel Morse (1791-1872) and other inventors, the telegraph revolutionized long-distance communication. It worked by transmitting electrical signals over a wire laid between stations. Morse Code & theTelegraph
  • 68. In addition to helping invent the telegraph, Samuel Morse developed a code (bearing his name) that assigned a set of dots and dashes to each letter of the English alphabet and allowed for the simple transmission of complex messages across telegraph lines. Morse Code & theTelegraph
  • 69. In 1844, Morse sent his first telegraph message, from Washington, D.C., to Baltimore, Maryland; by 1866, a telegraph line had been laid across the Atlantic Ocean from the U.S. to Europe. Morse Code & theTelegraph
  • 70. Although the telegraph had fallen out of widespread use by the start of the 21st century, replaced by the telephone, fax machine and Internet, it laid the groundwork for the communications revolution that led to those later innovations. Morse Code & theTelegraph
  • 72.
  • 75. The class is divided into 4 groups, each group must prepare 5 messages using the Morse code. Write the encrypted and decrypted messages on a clean ¼ yellow pad paper. Activity – Sender and Receiver
  • 76. Prepare ½ Crosswise CleanYellow Pad Paper Pseudo code
  • 77. #include <stdio.h> main() { int x = 1; if (x == 1) printf("x is equal to one."); else printf(“x is not equal to one"); getch(); } 1. Write the pseudo code
  • 78. #include <stdio.h> main() { float prelim, midterm, semiFinal, Final, Sum, average; clrscr(); printf(“prelim:”); scanf(“%f”, &prelim); printf(“midterm :”); scanf(“%f”, &midterm); printf(“semiFinal :”); scanf(“%f”, &semiFinal ); printf(“Final :”); scanf(“%f”, & ); sum = (prelim + midterm + semiFinal + Final); printf(“Total grade: %f”, sum); average = (sum/4); printf(“Total Average: %f”, average ); getch(); } 2. Write the pseudo code
  • 79. int x = 20; int y = 10; If (x < y) { system.out.println(“x is less than y”); } If (x == y) { system.out.println(“x is equal to y”); } If (x > y) { system.out.println(“x is less greater than y”); } 3. Write the pseudo code
  • 80. Prepare ½ cross wise clean yellow pad • 1101110 • 1011010 • 111010101 • 1011110111 • 10011011110 Try to convert, binary to decimal.
  • 81. • 228 • 301 • 534 • 196 • 152 Try to convert, decimal to binary .
  • 82. A.1 01 1 1 + 10101 = B.1011111 + 101111 = C.11011011 + 110101111 = D.11101111111 + 11011001111 = Binary Addition
  • 83. A.1011 – 0110 = B.11101 – 01111 = C.101101 – 011010 = D.111101 – 101110 = Binary Subtraction
  • 84. Convert into Morse code. The quick brown fox jumps over a lazy dog. Morse Code