computer science Flashcards
what are the 5 primitive data types in python?
integer, float/real, character, boolean and string
what does an integer data type store
whole numbers
what do float/real data types store?
numbers with decimals
what do boolean data types store?
true or false
what does the character data type store?
a single character
what type of error do you encounter when you use the wrong data type?
a type error
In sign and magnitude if the MSB is 0 what is the number
positive
what does MSB stand for?
Most Significant Bit
In sign and magnitude if the MSB is 1 what is the number
negative
In twos compliment if the MSB is 0 what is the number
positive
In twos compliment if the MSB is 1 what is the number
negative
What is the the biggest possible number able to be represented in two compliment?
+127
What is the the smallest possible number able to be represented in two compliment?
-128