Document Details

TruthfulPegasus

Uploaded by TruthfulPegasus

Bacoor National High School - Main

Tags

computer science number systems binary digital electronics

Summary

This document explains the concept of computer number systems, focusing on different types like binary, decimal, octal, and hexadecimal. It also demonstrates the conversion between these number systems. This document provides educational material on number systems.

Full Transcript

Computer Number System Week 4 – Quarter 2 What is number system? The technique to represent numbers is called the Number system. This is a set of values used to represent different quantities. For example, a number system is used to represent the number of audie...

Computer Number System Week 4 – Quarter 2 What is number system? The technique to represent numbers is called the Number system. This is a set of values used to represent different quantities. For example, a number system is used to represent the number of audiences in a movie hall or the number of people standing in a queue to collect tickets. The base or radix of a number system is the total number of digits used in it. It enables easy conversion of numbers for technical purposes. The entirety of computer architecture depends upon number systems (binary, octal and hexadecimal). Base or Radix 102410 Binary Number System: The binary number system is the most fundamental number system used in computer science. It uses only two digits, 0 and 1, to represent all numbers and data. Decimal Number System: The decimal number system is also used in computer science, but it is not as fundamental as the binary system. It uses ten digits, 0 through 9, to represent numbers. Octal Number System: The octal number system uses eight digits, 0 through 7, to represent numbers. It is commonly used in computer programming and digital electronics. Hexadecimal Number System: A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to 9 and A to F. Every number (value) represents with 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F in this number system. The base of the hexadecimal number system is 16 because it has 16 alphanumeric values. Here A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15. This system is widely used in computers to reduce the large-sized strings of the binary system. Conversion of the Number System in the Computer Converting between number system in computer science is an important skill, especially when working with binary, octal, and hexadecimal numbers. Here are the basic steps to convert a number from one number system to another: Conversion of the Number System in the Computer Understand the values of each digit in the current number system: Before you can convert a number, you need to understand how the current number system works. For example, in the binary system, each digit represents a power of two, starting with 20 on the right side. The binary number system uses positional notation. But in this case, each digit is multiplied by the appropriate power of two based on its position. For example, to convert the binary number 10112 to decimal, you would calculate (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20) =8+0+2+1= 1110. Same goes with Octal Number System For example, (24)8 in decimal is = 2×81 + 4×80 = (20)10 And Hexadecimal Number System For example, (5C)16 in decimal is = 5x161 + 12(C)x160 = 80 + 12 = 9210 Decimal To Binary In the decimal system, the base is 10 and every number is written as a combination of the powers of 10. Any integral number in the decimal system when divided by 2, will either leave a remainder of 0 or 1. Thus division by zero is a way to represent such numbers as a series of 0’s and 1’s. Therefore, to convert from decimal to binary, we keep dividing by 2 and go on recording the remainders. Let us see an example. Number System Conversion Example 1: Convert the number 22 from decimal to binary. Let us start dividing by 2 and noting the remainders. 22 ÷ 2 = 11 R 0 11 ÷ 2 = 5 R 1 5÷2=2R1 2÷2=1R 0 Starting from the 1 at the bottom, we can write a series of 1’s and 0’s as 1, 0, 1, 1, 0. This gives the binary equivalent of the number 22. Therefore, we write the binary equivalent of 22 as 10110. If done in this way, the remainder of the first step becomes the LSD (least significant digit) whereas the remainder of the last step becomes the MSD (Most Significant Digit).In short, if you have to convert from decimal to any number system, you should divide the number by the given base (e.g. 16 or 8 etc.).

Use Quizgecko on...
Browser
Browser