Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

10th

grade

Visual Basic
Computer Grade 10
PRAYER
Loving Father,
Come be with us today
Fill our hearts with joy
Fill our minds with learning
Fill our lessons with fun
Fill our friendships with kindness
Fill our school with love
Help us grow in love and kindness
more like Jesus everyday
Amen.
INPUT PROCESS OUTPUT
Approach
Is a pattern or approach that is widely used in systems
for transforming input data into output.

Proces
Input Output
s Input – is any data entered into the computer system.

Process – is a procedure being taken to provide an


output.

Output – it serves as the outcome of the process. It


meets the goal or end of the entire procedure.
Evolution of Computer
Programming Languages
Programming
is the art and science of creating programs.

What is a computer program?


is a series of instructions written to perform a specified task on computer

Programmer
is the one who writes, develops, and debugs a computer

Programming Language
it is a tool that is used by the programmer to communicate with the computer

Why write Programs?


“Programs must be written for people
to read, and only incidentally for
machines to execute.”

—Harold Abelson
Classifications of
Programming
Languages
1. Machine language
 A computer is an electronic machine it can only feel electricity and is
designed to work with information. It cannot understand human languages
but instead it uses the binary language or machine languages. It consists of
only 2 number, 1 and 0.

2. Assembly language

 It is more advanced than the machine language as it uses mnemonics in


place of machine codes to simplify the programmer’s way of creating
programs.
3. High level-language

 Allow programmers to use English commands to carry out instructions.

4. Declarative language / Object-oriented language

 Is the highest level programming languages that uses GUI-based


interfaces.
Stages in Software
Development
Requirements

maintenance Design

Implementatio
Deployment n

Testing and
Debugging
Classification of Program Bugs

Syntax Error Logic Error

Refers to the error in spelling Syntactically correct but


and grammar of the particular still produces incorrect
programming language results
Binary to Decimal
Decimal to Binary
Converting Binary to Decimal
Step by step Solution

Step 1: Write down the binary number

10101

Step 2: Multiply each digit of the binary number by the corresponding power of two.

10101 (2) = (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20)

Step 3: Solve the powers

10101 (2) = (1 x 16) + (0 x 8) + (1 x 4) + (0 x 2) + (1 x 1)


Converting Binary to Decimal
Step 3: Solve the powers

10101 (2) = (1 x 16) + (0 x 8) + (1 x 4) + (0 x 2) + (1 x 1)

10101 (2) = 16 + 0 + 4 + 0 + 1

Step 4: Add up the numbers written above

10101 (2) = 16 + 0 + 4 + 0 + 1

10101 (2) = 21

So, 21 is the decimal equivalent of the binary 10101


Converting Binary to Decimal
Step by step Solution

Step 1: Write down the binary number

10001

Step 2: Multiply each digit of the binary number by the corresponding power of two.

10001 (2) = (1 x 24) + (0 x 23) + (0 x 22) + (0 x 21) + (1 x 20)

Step 3: Solve the powers

10001 (2) = (1 x 16) + (0 x 8) + (0 x 4) + (0 x 2) + (1 x 1)


Converting Binary to Decimal
Step 3: Solve the powers

10001 (2) = (1 x 16) + (0 x 8) + (0 x 4) + (0 x 2) + (1 x 1)

10001 (2) = 16 + 0 + 0 + 0 + 1

Step 4: Add up the numbers written above

10001 (2) = 16 + 0 + 0 + 0 + 1

10001 (2) = 17

So, 17 is the decimal equivalent of the binary 10001


Converting Decimal to Binary
Step by step Solution
Remainders
Step 1: Write down the decimal number 2 29

2 14 1
Step 2: Divide the number by 2

2 7 0
Step 3: Write the result underneath
2 3 1
Step 4: Write the remainder on the right hand
side. This will be 0 or 1. 1
2 1
Step 5: Divide the result of the division by 2
again, write down the remainder. 0 1

Step 6: Continue dividing and writing down


remainders until the result of the division is 0
Converting Decimal to Binary
Step by step Solution
Remainders
2 29
Step 7: The Most Significant Bit (MSB) is at
the bottom of the column of remainders and
the Least Significant Bit (LSB) is at the top. 2 14 1 LSB

2 7 0

Step 8: Read the series of 1s and 0s on the 1


2 3
right from the bottom up. This is the binary
equivalent of the decimal number.
2 1 1

0 1 MSB
Therefore 11101 is the binary equivalent of
29
Converting Decimal to Binary
Step by step Solution
Remainders
Step 1: Write down the decimal number 2 14

2 7 0
Step 2: Divide the number by 2

2 3 1
Step 3: Write the result underneath
2 1 1
Step 4: Write the remainder on the right hand
side. This will be 0 or 1. 1
0
Step 5: Divide the result of the division by 2
again, write down the remainder.

Step 6: Continue dividing and writing down


remainders until the result of the division is 0
Converting Decimal to Binary
Step by step Solution
Remainders
Step 7: The Most Significant Bit (MSB) is at
the bottom of the column of remainders and
the Least Significant Bit (LSB) is at the top. 2 14

2 7 0 LSB

Step 8: Read the series of 1s and 0s on the 1


2 3
right from the bottom up. This is the binary
equivalent of the decimal number.
2 1 1

0 1 MSB
Therefore 1110 is the binary equivalent of
14
Asynchronous Activity
A. Convert the following decimal numbers into binary numbers

1. 15110
2. 3510
3. 4310
4. 25110
5. 102310

B. Convert the following binary numbers into decimal numbers

6. 11110101100111102
7. 1010012
8. 1012
9. 111112
10. 11002

You might also like