You are on page 1of 28

Good morning!

Please prepare paper and pen.


Programming Logic and Design
CPE112

Lecture Notes 1
Topics:
• Computer Fundamentals
• History of Computing
• Introduction to Computers , Computer Systems
and organization, Number Systems and Data
Representation
Introduction to Computers
 Personal Computer (PC) – a tool that lets you do
something.
◦ Hardware – the physical components of the computer.
Introduction to Computers
◦ Software - the instructions that makes the computer work.
 Operating system (OS) – software that manages computer hardware,
software resources, and provides common services for computer
programs
 Applications software - software that performs specific tasks for an
end-user.
History of Computing
The Internet
 LAN (Local Area Network) - a small network that
physically connects nearby computers (computers within
the firm, organization, or a household)
 WAN (Wide Area Network) - a larger network that
covers a city or a region.
 Internet – a world network of connected computers,
connected through WAN and LAN
The Internet
 World Wide Web (WWW) - one of the services that
can be used on Internet which enables us to view and
search contents in a form of web-pages.
 Internet data transfer:
◦ download - data storing from internet onto personal computer
◦ upload - data storing from personal computer to internet
server
◦ data rate units:
 bit per second (bps), kilobit per second (kbps), and megabit per second
(mbps).
Review
 There are many types of computers in existence.
 A person using a computer is known as the user.
 Each computer has its own operating system.
 Running multiple programs at once is called multitasking.
 Each computer has programs on it.
 Programs contain instructions that tell the computer what to do.
 Pictures of programs on the desktop are called icons.
 The keyboard contains many special keys that do different thing in different
programs.
 The mouse moves an arrow on the screen, which lets you select options and
run programs.
 A computer consists of various hardware, which work together.
Computer Organization
Computer Organization
 CPU - central processing unit
◦ Where decisions are made, computations are performed, and
input/output requests are delegated
 Memory
◦ Stores information being processed by the CPU
 Input devices
◦ Allows people to supply information to computers
 Output devices
◦ Allows people to receive information from computers
Number Systems and Data Representation
 Data is represented as 1’s and 0’s
◦ Bit - Each 1 and 0
◦ Nibble - 4 bits
◦ Byte – 8
◦ Word - 16/32/64/128 bits
 Number Systems:
◦ Binary – uses 0 and 1, what the computer understand. (Base 2)
◦ Decimal – what we used. (Base 10)
Number Systems
style of notations that represent quantities or numbers

DECIMAL BINARY OCTAL HEXADECIMAL

❑ base 10 ❑ base 2 ❑ base 8 ❑ base 16


❑ requires 10 ❑ uses only 2 ❑ used in ❑ used in assembly
different symbols symbols, computer language
❑ Valid Entries: 0 and 1 systems programming
0,1,2,3,4, ❑ mostly used for ❑ Valid entries: ❑ Valid entries:
5,6,7,8,9 computer 0,1,2,3,4,5,6,7 0,1,2,3,4,
❑ Example: applications ❑ Example: 5,6,7,8,9,
145 10 ❑ Valid Entries: 57 8 A,B,C,D,E,F
0, 1 ❑ Example:
❑ Example: 2AF 16
1010 1111 2
Binary to Decimal Conversion - Weighted

Try:
 What is 1111 in base 10?
 What is 1010 0111 in base 10?
Decimal to Binary Conversion - Division
LSB

MSB
Decimal to Binary Conversion - Division

Try:
 What is 83 in binary? 0101 0011 2
 What is 100 in binary? 0110 0100 2
Octal to Decimal
Conversion
(Base 8)

Try:
 What is 104 in octal converted to decimal? 68 10
 What is 381 in octal converted to decimal? Not possible
Decimal to Octal Conversion
 Converting decimal to octal is just like converting decimal to
binary, except instead of dividing by 2, we divide by 8.
 To convert 122 to octal:

Try
 What is 104 in decimal converted to octal? 150 8
 What is 381 in decimal converted to octal? 575 8
Octal to Binary, Binary to Octal
 3 bit combinations
Try:
 What is 441 octal in binary? 0001 0010 000 2
 What is 10110 binary in octal? 26 8
Hexadecimal Numbering
Hex to Decimal Conversion

Try:
 What is F00 in hex converted to decimal? 3840 10
 What is 12A in hex converted to decimal? 298 10
Decimal to Hex Conversion

Try:
5
 What is 33 in hex? 21 16 B
 What is 100 in hex 64 16 D
Hex to Binary Conversion,
Binary to Hex

Try:
 What is 1000 00112 in hex? 83 16
 What is 1E16 in binary 0001 1110 2
More samples
 Convert 1001 00012 to:  Convert 768 to:
◦ Decimal ◦ Binary 0011 1110 2
145 10
◦ Octal 221 8 ◦ Decimal 62 10
◦ Hexadecimal 91 16 ◦ Hexadecimal 3E 16
 Convert 202110 to:  Convert ABC16 to:
◦ Binary 0111 1110 0101 2 ◦ Binary 1010 1011 1100 2
◦ Octal 3745 8 ◦ Decimal 2748 10
◦ Hexadecimal 7E5 16 ◦ Octal 5274 8
Please excuse my handwriting. ☺
Assignment – Show your solutions
(handwritten). Capture and submit to given link.
 Convert 1111 11012 to:  Convert 20218 to:
◦ Decimal ◦ Decimal
◦ Octal  Convert CE16 to:
◦ Hexadecimal ◦ Decimal
 Convert your  Convert 202116 to:
IDnumber10 to: ◦ Binary
◦ Binary  Convert 798 to:
◦ Octal ◦ Binary
◦ Hexadecimal
https://forms.gle/CDf4QyAGkuzYaCqMA
Practice Quiz – Computer Concepts
 http://www.thrall.org/computerbasics/quiz.htm

 Bonus: Get your initials


 Ex: for Miriam Mejias Bergado, it’s MMB
◦ – get the ascii code equivalent
 What is your initials in binary?

You might also like