SEN307 Lecture 2: Introduction to Number System PDF

Document Details

UnbiasedJacksonville

Uploaded by UnbiasedJacksonville

Nile University of Nigeria

2024

Austin Olom Ogar

Tags

number systems computer architecture binary digital systems

Summary

This document provides a lecture on number systems, including positional and non-positional systems, decimal (base 10), binary (base 2), octal (base 8), and hexadecimal (base 16) with conversions. It also discusses the importance of number systems in computer architecture. Austin Olom Ogar is the author, and the lecture was delivered at Nile University of Nigeria in 2024.

Full Transcript

Lecture 2 Introduction to Number System Computer Architecture- NUN 2024 Austin Olom Ogar MODULE OUTLINE Introduction to Number Systems Types of Number Systems Positional vs. Non-Positional Number Systems Decimal Number System (Base 10) Binary Number System (Base 2). System (Base...

Lecture 2 Introduction to Number System Computer Architecture- NUN 2024 Austin Olom Ogar MODULE OUTLINE Introduction to Number Systems Types of Number Systems Positional vs. Non-Positional Number Systems Decimal Number System (Base 10) Binary Number System (Base 2). System (Base 8) Octal Number Hexadecimal Number System (Base 16) Conversions Between Systems Applications of Number Systems in Computing Signed and Unsigned Numbers Two's Complement System Floating-Point Numbers and Representation Computer Architecture- NUN 2024 Austin Olom Ogar Introduction to Number Systems Definition: A number system is a mathematical framework used to represent and organize numbers using specific symbols, known as digits, according to set rules. Different types of number systems exist, including Decimal (Base 10), Binary (Base 2), Octal (Base 8), and Hexadecimal (Base 16), each defined by the base that indicates the number of unique digits or symbols it contains. In each system, the position of a digit within a number determines its value, a principle called the positional value. This organization allows numbers to be represented in unique ways, suitable for various applications such as daily arithmetic or computer processing.. Importance in Computer Architecture: In computer architecture, number systems are fundamental for several reasons: Data Representation: Computers operate in binary; understanding binary (0s and 1s) is crucial for how systems encode data. Every instruction, character, and numeric value is represented in binary, making it the foundational language of computers. Memory Addressing and Data Storage: The hexadecimal and octal number systems offer shorthand versions of binary representations, simplifying the human interpretation of machine data. Hexadecimal, in particular, is used in addressing memory locations, making it easier to read and write complex memory addresses accurately. Arithmetic and Logic Operations: Digital circuits within a computer’s Central Processing Unit (CPU) perform operations based on binary logic. Understanding binary and two’s complement systems is essential for representing positive and negative numbers and performing calculations that guide computer functions. Error Detection and Correction: Systems such as parity bits and checksums, which are used to detect errors in data transmission, rely on binary encoding principles. Through number systems, computers can identify and rectify data errors, ensuring the accuracy and reliability of data transfer. Types of Number Systems Decimal (Base 10): The most familiar number system, using ten digits (0-9). Each position represents a power of 10. Commonly used in everyday arithmetic and financial calculations. Binary (Base 2): Used in computer systems, this system consists of only two digits, 0 and 1. Each position represents a power of 2, making it ideal for digital and logic-based systems.. Octal (Base 8): This system uses eight digits (0-7) and is useful for compact representation of binary numbers. Each position represents a power of 8, often applied in older computing systems and Unix file permissions. Hexadecimal (Base 16): This system uses sixteen symbols (0-9 and A-F), simplifying binary notation for memory addressing. Each position is a power of 16, often used in computing for efficient representation of binary data Introduction to Number Systems Number systems are essential in mathematics and computing to represent values. They can be categorized into positional and non-positional systems, based on how they assign value to each symbol or digit within a number.. Positional Number System: In a positional number system, the value of a digit depends on both its intrinsic value and its position within the number. Each position is associated with a specific base power, allowing the system to express a wide range of values using a limited set of symbols. In positional systems, each digit’s position represents a power of the base. For example, in the decimal system (base 10),. each position (ones, tens, hundreds, etc.) corresponds to powers of 10. Non-Positional Number System: In a non-positional number system, each symbol or digit has a fixed value, and its position in the sequence does not affect the overall value. The value is simply the sum or concatenation of the symbols, with each having a set meaning regardless of position. Non-positional systems are based on the fixed value assigned to symbols. Since there’s no positional weighting, these systems are limited in range and usually used for non-mathematical purposes, such as numbering items or categories Practical Applications of Positional and Non-Positional Number System: Positional Systems are widely used in modern computing, digital systems, and day-to-day calculations. Non-Positional Systems are mostly found in historical texts and used for limited categorical purposes. Decimal Number System (Base 10) The decimal number system is the most widely used numerical system globally. Also known as the base-10 system, it consists of 10 digits ranging from 0 to 9. In this system, the position of each digit in a number determines its value, making it a positional notation system. Each position represents a power of 10, with higher powers for digits further to the left. How the Decimal System Works:. In the decimal system, each digit’s value is multiplied by a power of 10 based on its position from the right. The rightmost digit is in the 100 place (the “ones” place), the next digit to the left is in the 101 place (the “tens” place), and so forth. The number’s total value is the sum of all the values represented by each digit. Example of Decimal Numbers Example 1: The number 452 in decimal form represents: 4×102 + 5×101 + 2×100 = 400 +50 + 2 = 4524 Example 2: The decimal number 7,318 is calculated as: 7×103 + 3×102 + 1×101 + 8×100 = 7000 + 300 +10 + 8 = 7,3187 Binary Number System (Base 2) The binary number system, also known as base-2, represents numeric values using only two symbols: 0 and 1. Each digit in a binary number is called a bit (short for binary digit). This system is a positional notation where each digit’s position corresponds to a power of 2, making binary the simplest counting system in mathematics. The binary system is the foundation of computing and digital electronics, as it aligns perfectly with the two-state logic (on and off) used in electronic circuits. How the Binary System Works:. In binary, each digit represents an increasing power of 2 from right to left:Example of Decimal Numbers Binary to Decimal Conversion: For instance, the binary number 1011 is calculated as follows 1×23+0×22+1×21+1×20 = 8 + 0 + 2 + 1=1110 Decimal to Binary Conversion: To convert a decimal number (e.g., 11) to binary, divide by 2 and track remainders: 11 divided by 2 gives 5, remainder 1 5 divided by 2 gives 2, remainder 1 2 divided by 2 gives 1, remainder 0 1 divided by 2 gives 0, remainder 1 So, 11 in decimal equals 1011 in binary. Octal Number System (Base 8) The Octal Number System, also known as base-8, is a positional numeral system that uses eight distinct digits: 0, 1, 2, 3, 4, 5, 6, and 7. Each position in an octal number represents a power of 8, similar to how the decimal system uses powers of 10. The octal system is particularly advantageous for simplifying binary code, as each octal digit maps directly to a three-bit binary segment, which aids in compact and efficient representation. How the Octal System Works: The octal number system uses the following format for conversions:. Binary to Octal Conversion: Since 8 is 23 , every three binary bits can be grouped together to form a single octal digit. For instance: Binary: 101 110 becomes Octal: 56 (base 8) Decimal to Octal Conversion: By repeatedly dividing the decimal number by 8 and recording the remainders, you convert it to octal. For example: Decimal: 78 78÷8=9, remainder 6 9÷8=1, remainder 1 So, 7810=1168 Hexadecimal Number System (Base 16) The Hexadecimal Number System, also known as base-16, is a positional numeral system that includes sixteen distinct symbols to represent values from 0 to 15:Digits 0–9 represent values 0 to 9.Letters A-F represent values 10 to 15, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.Each position in a hexadecimal number represents a power of 16. For example, in hexadecimal, the number 3B7 (base 16) represents: 3×162 +B×161 +7×160 = 768 + 176 + 7 = 951 (decimal) How the Hexadecimal System Works:. The hexadecimal system simplifies the representation of binary numbers by grouping four binary bits per hexadecimal digit. This allows for a compact way to work with binary data: Binary to Hexadecimal Conversion: Convert each group of four binary bits into a single hexadecimal digit. For instance: For instance, the binary number 1011 is calculated as follows Binary: 1101 1110 converts to Hexadecimal: DE (base 16)​ Decimal to Hexadecimal Conversion: Divide the decimal number by 16 repeatedly, recording remainders, to convert it into hexadecimal. Conversions Between Systems Converting between different number systems (Decimal, Binary, Octal, and Hexadecimal) is essential for various applications in computing and digital technology. Each system represents numbers differently, making conversions crucial for interpreting data across different platforms. Here, we’ll outline. the methods for converting Decimal (Base 10) numbers into Binary (Base 2), Octal (Base 8), and Hexadecimal (Base 16) systems and vice versa Assignment.

Use Quizgecko on...
Browser
Browser