4.5 Data Representation Flashcards
What do you use to represent negative numbers in binary?
2’s complement
What is it called when you have a leftover carry bit after addition in binary?
An overflow
What is the quickest way to multiply a binary number by 2?
Shift each column to the left by one padding the right with zeros
What is the quickest way to multiply a binary number by 4?
Shift each column to the left by two padding the right with zeros
When using 2’s complement what is the MSB used as?
A sign bit
What is the main method we use to convert a number into a negitave using twos compliment?
Starting from the LSB copy up to and including the first one after that continue down the number and invert each bit
What does LSB stand for?
Least significant bit
What does MSB stand for?
Most significant bit
What is the method we dont use to convert a number into a negitave using twos compliment?
Invert all bits then add one
How do we subtract one number from another in binary?
Convert the number you wish to subtract into 2’s compliment and then add them
When there is overflow when subtracting what do you do about it?
Nothing, you ignore it
What are the types of numbers?
Rational, Irrational, Natural, Integer, Real and Ordinal
What letter symbols represent irrational numbers?
Q and R
What letter symbols represents natural numbers?
N
What letter symbols represents integers?
Z
What is the basic definition for rational numbers?
It is a number that can be represented by two integers in a fraction.
What is the basic definition for irational numbers?
It is a number that cannot be represented by two integers in a fraction.
What is the basic definition for real numbers?
It is a number that is not imaginary
What is the basic definition for intigers?
It is a number that has no decimal places (Whole numbers)
What is the basic definition for ordinal numbers?
It is a number that is used for indexing and is thus a position on a list
What is the basic definition for natural numbers?
It is a number that is greater than or equal to 0 and is whole (not negative)
Describe a set of rational numbers
A set of rational numbers would be numbers where the numerator and denominators are whole numbers
Why are all integers rational numbers?
Because all integers can be written as a fraction as they are all divisible by one
How do you what do you use to represent fractions in binary?
You use fixed point notation