Investigates how data are represented in computers and exploits them in arithmetic and logic operations
3-13-23-33-4
Analyses how numeric data are represented in computers
Number Systems used in Computing / පරිගණනයේ දී භාවිතා වන සංඛ්යා පද්ධති
MSD & LSD | Number Systems & Conversions
MSD and LSD
- Most Significant Digit and Least Significant Digit (MSD and LSD) Other important factors of number systems that you should recognize are the MOST SIGNIFICANT DIGIT (MSD) and the LEAST SIGNIFICANT DIGIT (LSD).
- The MSD in a number is the digit that has the greatest effect on that number.
- The LSD in a number is the digit that has the least effect on that number.
- You can easily see that a change in the MSD will increase or decrease the value of the number the greatest amount.
- Changes in the LSD will have the smallest effect on the value.
- The non-zero digit of a number that is the farthest LEFT is the MSD, and the non-zero digit farthest RIGHT is the LSD, as in the following example.
- Examples:
Number Systems / සංඛ්යා පද්ධති
Conversions among Number Systems / සංඛ්යා පද්ධති අතර පරිවර්තන
B2D & D2B | O2D & D2O | H2D & D2H | B2O & B2H & O2B & H2B
Number Conversions / සංඛ්යා පරිවර්තන - B2D vice versa D2B
Number Conversions / සංඛ්යා පරිවර්තන - O2D vice versa D2O
Number Conversions / සංඛ්යා පරිවර්තන - H2D vice versa D2H
Number Conversions / සංඛ්යා පරිවර්තන - B2O & B2H vice versa O2B & H2B
Analyses how character data are represented in computers
Capacity of Computers / පරිගණකවල ධාරිතාව
- bit / බිටුව
bit (BInary digiT)-The smallest element of computer storage. It is a single digit in a binary number (0 or 1). The bit is physically a transistor or capacitor in a memory cell, a magnetic domain on disk or tape, a reflective spot on optical media or a high or low voltage pulsing through a circuit.
- Byte / බයිට
- Kilobyte (KB) / කිලෝබයිට
- Megabyte (MB) / මෙගාබයිට
- Gigabyte (GB) / ගිගාබයිට
- Terabyte (TB) / ටෙරාබයිට
Coding Systems / කේත පද්ධති
Uses basic arithmetic and logic operations on Binary, Octal, and Hexadecimal numbers
Basic Arithmetic and Logic Operations / මූලික අංක ගණිතමය හා තාර්කික මෙහෙයුම්
Bitwise Logic Operations / බිටු අනුසාරිත තාර්කික මෙහෙයුම්
Bitwise Operations
Definition
- In digital computer programming, a bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast, primitive action directly supported by the processor, and is used to manipulate values for comparisons and calculations.
- On simple low-cost processors, typically, bitwise operations are substantially faster than division, several times faster than multiplication, and sometimes significantly faster than addition. While modern processors usually perform addition and multiplication just as fast as bitwise operations due to their longer instruction pipelines and other architectural design choices, bitwise operations do commonly use less power because of the reduced use of resources.
Analyses how signed numbers are represented in computers and uses standard methods to represent floating point numbers
Ones'Complement and Two’s Complement / 1හි අනුපූරකය සහ 2හි අනුපූරකය
Ones' Complement
Definition
- The ones’ complement of a binary number is defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0s for 1s and vice-versa). The ones’ complement of the number then behaves like the negative of the original number in some arithmetic operations. To within a constant (of −1), the ones’ complement behaves like the negative of the original number with binary addition. However, unlike two’s complement, these numbers have not seen widespread use because of issues such as the offset of −1, that negating zero results in a distinct negative zero bit pattern, less simplicity with arithmetic borrowing, etc.
- A ones’ complement system or ones’ complement arithmetic is a system in which negative numbers are represented by the arithmetic negative of the value. In such a system, a number is negated (converted from positive to negative or vice versa) by computing its ones’ complement.
- An N-bit ones’ complement numeral system can only represent integers in the range −(2^{N−1}−1) to 2^{N−1}−1 while two’s complement can express −2^{N−1} to 2^{N−1}−1.
Two’s Complement
Definition
- Two’s complement is a mathematical operation on binary numbers, as well as a binary signed number representation based on this operation. Its wide use in computing makes it the most important example of a radix complement.
- The two’s complement of an N-bit number is defined as the complement with respect to 2^{N}; in other words, it is the result of subtracting the number from 2^{N}, which in binary is one followed by N zeroes. This is also equivalent to taking the ones’ complementand then adding one, since the sum of a number and its ones’ complement is all 1 bits. The two’s complement of a number behaves like the negative of the original number in most arithmetic, and positive and negative numbers can coexist in a natural way.
- In two’s-complement representation, positive numbers are simply represented as themselves, and negative numbers are represented by the two’s complement of their absolute value; the table on the right provides an example for N = 8. In general, negation (reversing the sign) is performed by taking the two’s complement. This system is the most common method of representing signed integers on computers.
- An N-bit two’s-complement numeral system can represent every integer in the range −(2^{N − 1}) to +(2^{N − 1} − 1) while ones’ complement can only represent integers in the range −(2^{N − 1} − 1) to +(2^{N − 1} − 1).
Representing Floating Point Numbers in Normalized Form / ඉපිලෙන ලක්ෂ්ය සංඛ්යා ප්රමත ආකාරයෙන් නිරූපණය