The Binary Number
System:
The binary number system forms the basis of computer
language. It's a simple yet powerful system that allows
computers to process and store information. This
fundamental concept is crucial for understanding how
computers work at their core.
by Mark Saura
MS
Machine Language: The Computer's
Native Tongue
1 Binary Code
A computer works with a language known as a machine
language.
Machine language consists of binary code, using only 0s and 1s.
2 Direct Execution
A computer does not work with decimal numbers.
The computer's microprocessor can execute machine language
instructions without translation.
Data: Information in Binary
Form
Numbers
Data means numbers or any information that goes into the computer.
The data are be stored, process or manipulated, updated by the
computer in order to produce the desired result. That is why
computers are often called data processors.
Letters and symbols are encoded into binary using standards like ASCII.
Visual data is represented as binary patterns of pixels. Audio/Sound
waves are sampled and converted into binary data.
Data Processing: The Core Function of
Computers
1
Input
Data is entered into the computer
through various input devices.
2 Storage
The computer stores data in
memory or on storage devices.
3
Processing
The CPU manipulates and processes
the data according to instructions. 4 Output
Processed data is presented through
output devices like monitors or
printers.
Computer Programs:
Instructions for Data
Processing
Series of Instructions
Programs are step-by-step instructions telling the computer what to
do.
Task-Specific
Programs are designed for specific tasks like calculations or data
management.
Binary Conversion
Programs are converted to binary code for the computer to
understand.
High-Level Programming Languages
BASIC
A beginner-friendly
language with simple
syntax. It's often used for
educational purposes.
Pascal
Known for its clear
structure. Pascal is
commonly used in teaching
programming concepts.
C++
A powerful language for
system and application
development. It offers high
performance and flexibility.
From High-Level to Machine Code
1
Writing Code
Programmers write code in a high-level language like C++ or
Python.
2
Compilation
The code is compiled, translating it into machine-readable
instructions.
3
Execution
The computer's processor executes the compiled binary code
directly.
Output: Presenting Results
Output Type Device Format
Visual Monitor Digitized alphanumeric
Print Printer Alphanumeric on paper
Audio Speakers Sound waves
Binary Number System
Binary numbers are used extensively throughout the digital systems, because of the very
nature of electronics. A 1 can be represented by a saturated transistor, a light turned on or a
relay energized. A 0 can be represented as a cutoff transistor, a light turn off, or a de-
energized relay. In each of these, there are only two values that the device can assume. For
this reason, the binary number system will be studied in detail.
Converting Binary to Decimal, Octal and
Hexadecimal
To convert binary numbers to decimal, multiply each digit in the binary number by 2
raised to the power of its position, starting with the rightmost digit.
1.
In converting binary to octal number, group the binary into sets of three starting from
the rightmost digit. Then convert each three binary digits into its corresponding octal
digit.
2.
On the other hand, to convert binary to hexadecimal, group the binary digits into sets
of four starting from the rightmost digit. Then convert each group of four binary digits
into its corresponding hexadecimal digit.
3.
Computer Number System Table
Binary to Decimal (1001101)
To convert binary numbers to decimal, multiply each digit in the binary number by 2
raised to the power of its position, starting with the rightmost digit.
Binary to Decimal (1001101)
To convert binary numbers to decimal, multiply each digit in the binary number by 2
raised to the power of its position, starting with the rightmost digit.
Octal to Binary
On the other hand, to convert binary to hexadecimal, group the binary digits into sets of
four starting from the rightmost digit. Then convert each group of four binary digits into its
corresponding hexadecimal digit.
Activity 2: Binary to Decimal, Octal, and
Hexadecimal
The Octal Number
System:
We must remember that this number system is only an
extension of binary system, it was develop only to express
binary numbers concisely. This number system has a base
of 8 and uses the digits from the set of {0, 1, 2, 3, 4, 5, 6, 7}.
by Mark Saura
MS
Converting Octal to Decimal, Binary and
Hexadecimal
To convert Octal Numbers to binary, simply replace each octal digit with the
corresponding 3-bit binary string.
1.
To convert Octal to hexadecimal, do the same thing as you did when converting to
octal to binary. When the octal numbers are now in the binary form, group them by 4
and convert to its corresponding hexadecimal number.
2.
To convert octal numbers to decimal numbers, multiply each digit in the octal number
by 8 raised to the power of its position, starting with the rightmost digit.
3.
Octal to Binary System
To convert Octal Numbers to binary, simply replace each octal digit with the
corresponding 3-bit binary string.
For example,
to convert 2138, let us replace them with 3-bit binary string starting with
010 (for 2),
001 (for 1)
011 (for 3)
Thus, you get 100010112.
Octal to Hexadecimal System
To convert Octal to hexadecimal, do the same thing as you did when converting to octal
to binary. When the octal numbers are now in the binary form, group them by 4 and
convert to its corresponding hexadecimal number.
For example,
Convert 3028 to hexadecimal.
First replace each octal digit: 2 becomes 010, 0 becomes 000, 3 becomes 011.
We now have 011000010.
Then, group them by four and convert them into its corresponding hexadecimal digit:
0010 becomes 2, and 1100 becomes C
C216 in hexadecimal
Octal to Decimal System
To convert octal numbers to decimal numbers, multiply each digit in the octal number by
8 raised to the power of its position, starting with the rightmost digit.
For example,
The Hexadecimal
Number System:
Hexadecimal number system was develop to express
binary numbers concisely. Computer word length comes
in 8 bits, 16 bits, 32 bits, and so on. This number system has
a base of 16 and uses digits from 0 to 9 and symbols from A
to F. The symbol A represents 10, B represents 11, C
represents 12, D is 13, E is 14 and F as 15.
by Mark Saura
MS
Converting Hexadecimal to Binary
To convert Hexadecimal numbers to binary, simply replace each hexadecimal digit with
the corresponding 4-bit binary string.
Converting Hexadecimal to Octal
To convert hexadecimal to octal, convert the hexadecimal number to binary, then group
by three the binary and apply corresponding octal numbers.
Converting Hexadecimal to Decimal
To convert hexadecimal numbers to decimal numbers, multiply each digit in the octal
number by 16 raised to the power of its position, starting with the rightmost digit.
Activity 3: Hexadecimal to Decimal, Octal, and
Binary

The Number System( Introduction to Binary System)

  • 1.
    The Binary Number System: Thebinary number system forms the basis of computer language. It's a simple yet powerful system that allows computers to process and store information. This fundamental concept is crucial for understanding how computers work at their core. by Mark Saura MS
  • 2.
    Machine Language: TheComputer's Native Tongue 1 Binary Code A computer works with a language known as a machine language. Machine language consists of binary code, using only 0s and 1s. 2 Direct Execution A computer does not work with decimal numbers. The computer's microprocessor can execute machine language instructions without translation.
  • 3.
    Data: Information inBinary Form Numbers Data means numbers or any information that goes into the computer. The data are be stored, process or manipulated, updated by the computer in order to produce the desired result. That is why computers are often called data processors. Letters and symbols are encoded into binary using standards like ASCII. Visual data is represented as binary patterns of pixels. Audio/Sound waves are sampled and converted into binary data.
  • 4.
    Data Processing: TheCore Function of Computers 1 Input Data is entered into the computer through various input devices. 2 Storage The computer stores data in memory or on storage devices. 3 Processing The CPU manipulates and processes the data according to instructions. 4 Output Processed data is presented through output devices like monitors or printers.
  • 5.
    Computer Programs: Instructions forData Processing Series of Instructions Programs are step-by-step instructions telling the computer what to do. Task-Specific Programs are designed for specific tasks like calculations or data management. Binary Conversion Programs are converted to binary code for the computer to understand.
  • 6.
    High-Level Programming Languages BASIC Abeginner-friendly language with simple syntax. It's often used for educational purposes. Pascal Known for its clear structure. Pascal is commonly used in teaching programming concepts. C++ A powerful language for system and application development. It offers high performance and flexibility.
  • 7.
    From High-Level toMachine Code 1 Writing Code Programmers write code in a high-level language like C++ or Python. 2 Compilation The code is compiled, translating it into machine-readable instructions. 3 Execution The computer's processor executes the compiled binary code directly.
  • 8.
    Output: Presenting Results OutputType Device Format Visual Monitor Digitized alphanumeric Print Printer Alphanumeric on paper Audio Speakers Sound waves
  • 9.
    Binary Number System Binarynumbers are used extensively throughout the digital systems, because of the very nature of electronics. A 1 can be represented by a saturated transistor, a light turned on or a relay energized. A 0 can be represented as a cutoff transistor, a light turn off, or a de- energized relay. In each of these, there are only two values that the device can assume. For this reason, the binary number system will be studied in detail.
  • 10.
    Converting Binary toDecimal, Octal and Hexadecimal To convert binary numbers to decimal, multiply each digit in the binary number by 2 raised to the power of its position, starting with the rightmost digit. 1. In converting binary to octal number, group the binary into sets of three starting from the rightmost digit. Then convert each three binary digits into its corresponding octal digit. 2. On the other hand, to convert binary to hexadecimal, group the binary digits into sets of four starting from the rightmost digit. Then convert each group of four binary digits into its corresponding hexadecimal digit. 3.
  • 11.
  • 12.
    Binary to Decimal(1001101) To convert binary numbers to decimal, multiply each digit in the binary number by 2 raised to the power of its position, starting with the rightmost digit.
  • 13.
    Binary to Decimal(1001101) To convert binary numbers to decimal, multiply each digit in the binary number by 2 raised to the power of its position, starting with the rightmost digit.
  • 14.
    Octal to Binary Onthe other hand, to convert binary to hexadecimal, group the binary digits into sets of four starting from the rightmost digit. Then convert each group of four binary digits into its corresponding hexadecimal digit.
  • 15.
    Activity 2: Binaryto Decimal, Octal, and Hexadecimal
  • 16.
    The Octal Number System: Wemust remember that this number system is only an extension of binary system, it was develop only to express binary numbers concisely. This number system has a base of 8 and uses the digits from the set of {0, 1, 2, 3, 4, 5, 6, 7}. by Mark Saura MS
  • 17.
    Converting Octal toDecimal, Binary and Hexadecimal To convert Octal Numbers to binary, simply replace each octal digit with the corresponding 3-bit binary string. 1. To convert Octal to hexadecimal, do the same thing as you did when converting to octal to binary. When the octal numbers are now in the binary form, group them by 4 and convert to its corresponding hexadecimal number. 2. To convert octal numbers to decimal numbers, multiply each digit in the octal number by 8 raised to the power of its position, starting with the rightmost digit. 3.
  • 18.
    Octal to BinarySystem To convert Octal Numbers to binary, simply replace each octal digit with the corresponding 3-bit binary string. For example, to convert 2138, let us replace them with 3-bit binary string starting with 010 (for 2), 001 (for 1) 011 (for 3) Thus, you get 100010112.
  • 19.
    Octal to HexadecimalSystem To convert Octal to hexadecimal, do the same thing as you did when converting to octal to binary. When the octal numbers are now in the binary form, group them by 4 and convert to its corresponding hexadecimal number. For example, Convert 3028 to hexadecimal. First replace each octal digit: 2 becomes 010, 0 becomes 000, 3 becomes 011. We now have 011000010. Then, group them by four and convert them into its corresponding hexadecimal digit: 0010 becomes 2, and 1100 becomes C C216 in hexadecimal
  • 20.
    Octal to DecimalSystem To convert octal numbers to decimal numbers, multiply each digit in the octal number by 8 raised to the power of its position, starting with the rightmost digit. For example,
  • 21.
    The Hexadecimal Number System: Hexadecimalnumber system was develop to express binary numbers concisely. Computer word length comes in 8 bits, 16 bits, 32 bits, and so on. This number system has a base of 16 and uses digits from 0 to 9 and symbols from A to F. The symbol A represents 10, B represents 11, C represents 12, D is 13, E is 14 and F as 15. by Mark Saura MS
  • 22.
    Converting Hexadecimal toBinary To convert Hexadecimal numbers to binary, simply replace each hexadecimal digit with the corresponding 4-bit binary string.
  • 23.
    Converting Hexadecimal toOctal To convert hexadecimal to octal, convert the hexadecimal number to binary, then group by three the binary and apply corresponding octal numbers.
  • 24.
    Converting Hexadecimal toDecimal To convert hexadecimal numbers to decimal numbers, multiply each digit in the octal number by 16 raised to the power of its position, starting with the rightmost digit.
  • 25.
    Activity 3: Hexadecimalto Decimal, Octal, and Binary