Media is too big
VIEW IN TELEGRAM
Lecture 0 | Full Computer Science
@Computer_science_course
@Computer_science_course
Converting binary fractions to rational numbers (decimal fractions)
π To convert binary fractions to their decimal equivalents, all we have to do is multiply each bit with its power of 2 position.
π Note: To convert octal and hexadecimal fractions to their decimal equivalents we follow the same steps
we used above except we change the multiplier(Base) to 8 and 16 respectively.
Converting rational numbers to Baes B fractions
πTo convert rational numbers to their Base B fraction equivalent we will follow the following steps.
Step 1: Multiply the number after decimal point by B
Step 2: Take number before the decimal point from the result.
Step 3: repeat steps 1 and 2 until there is no decimal point to multiply
@Computer_science_course
π To convert binary fractions to their decimal equivalents, all we have to do is multiply each bit with its power of 2 position.
π Note: To convert octal and hexadecimal fractions to their decimal equivalents we follow the same steps
we used above except we change the multiplier(Base) to 8 and 16 respectively.
Converting rational numbers to Baes B fractions
πTo convert rational numbers to their Base B fraction equivalent we will follow the following steps.
Step 1: Multiply the number after decimal point by B
Step 2: Take number before the decimal point from the result.
Step 3: repeat steps 1 and 2 until there is no decimal point to multiply
@Computer_science_course
Computer Arithmetic
Now that binary numbers are discussed, itβs time to look at how their arithmetic works. But
there are two basic binary number representations so far. Unsigned binary numbers and binary
numbers that are represented using the sign and magnitude method.
@Computer_science_course
Now that binary numbers are discussed, itβs time to look at how their arithmetic works. But
there are two basic binary number representations so far. Unsigned binary numbers and binary
numbers that are represented using the sign and magnitude method.
@Computer_science_course
Addition & subtraction for signed binary integers (using sign and magnitude)
πIf the binary numbers are signed then addition and subtraction can be expressed using just the
addition operation.
πTake a look at the following equations.
πX β Y = X + (- Y )
π-X β Y = (- X ) + (- Y)
πRecap: The first bit of the binary number indicates sign, 0 for positive and 1 for negative
πRules:
1. Identify the sign of each binary number [ the sign bit is excluded for the calculation]
A. If they both have the same sign
πAdd the two binaries.
πApply the sign to the result.
@Computer_science_course
πIf the binary numbers are signed then addition and subtraction can be expressed using just the
addition operation.
πTake a look at the following equations.
πX β Y = X + (- Y )
π-X β Y = (- X ) + (- Y)
πRecap: The first bit of the binary number indicates sign, 0 for positive and 1 for negative
πRules:
1. Identify the sign of each binary number [ the sign bit is excluded for the calculation]
A. If they both have the same sign
πAdd the two binaries.
πApply the sign to the result.
@Computer_science_course