part 1, binary data representation and computation Flashcards
explain what a logic circuit is
this is a combination of logic gates that can perform more complex operations and outputs than could be accomplished with a single logic gate
how many representations of 0 does twos compliment have
this has only one representation of 0
with this a 0 represents a positive (+) and a 1 represents a negative (-)
in sign magnitude the first bit represents the sign of the number, but what does the 0 bit represent and what does the 1 bit represent
upper case letters start with 0100
what 4 bits do uppercase letters start with in ASCII
what are the 3 distinct parts of scientific notation
- a sign
- a mantissa (the decimal part beginning with digits 0-9 )
- an exponent (the power of 10)
this is a standard used to represent numbers and letters that are currently in use across the globe it became the standard in 2007
what is UTF-8 and when did it become the standard to be used
what does de morgans law ultimately mean
** ****** *** ultimately means that it is possible to build any logic circuits using a combination of just two logic gates
- And gate and NOT gate
- OR gate and NOT gate
this has only one representation of 0
how many representations of 0 does twos compliment have
this uses 8 bytes to store a floating point number
how many bytes does a double (double precision) use to store a float
the algorithm says that if both signs are the same for the numbers you are adding then add the smaller number to the larger number
your following the sign magnitude algorithm for addition. the numbers you are adding have the same sign. by the algorithm what is the step you should follow
describe how the truth table for the NOT operation would look with an input of A
- a sign
- a mantissa (the decimal part beginning with digits 0-9 )
- an exponent (the power of 10)
what are the 3 distinct parts of scientific notation
this works by outputing a 1 if two or more inputs are both 1
explain how the AND operation works
the original 7-bit ASCII has been preserved by this standard
what has been preserved by UTF-8
this uses a variable amount of bytes up to 6
how many bytes does UTF-8 use
what is a truth table
a truth table will take all possible inputs and then output all the posssibilitys of the operation you are performing on the inputs
how far apart are lower case letters and upper case letters in ASCII
they differ by 32 this is because the 32nd bit is flipped on or off depending on using lower or upper case letter
this is any integer greater than or equal to 0
what is an unsigned integer
let max = 4
if max is 4 then 3 + 2 would cause an overflow
the following pseudo code would warn us of this overflow before we perform the calculation
if (3 >= Max - 2) {
log overflow}
explain the technique of using a programming languages max value constant to help avoid an overflow when using addition
what is sign magnitude
this is a type of encoding that allows for signed integers
he was a friend of george boole and is the founder of the de morgans law
who is augustus de morgan and what is he the founder of
if we have n bits. what is the expression for the amount of unsigned integers that can be represented
the amount of unsigned integers that can be represented is 2^n
what has been preserved by UTF-8
the original 7-bit ASCII has been preserved by this standard
how many bytes does a typical float have
this has 4 bytes
- it can cause overflow
- it is able to be used for subtraction, division and multiplication, by turning each of these calculations into an addition problem
what are two important notes about the twos complement addition algorithm
Subtract 00110000 from the ASCII code
A character representing a digit, n, is stored as an 8-bit ASCII code. It needs to be converted into an 8 bit sign-magnitude representation for the positive numerical value, n. What is the algorithm for doing this?
- a sign
- a mantissa (the decimal part. always begins with 1)
- an exponent (a power of 2)
what are the 3 rules for scientific notation for binary numbers
using n bits in twos compliment. what is the expression for the largest positive integer that can be represented
the largest positive integer that can be represented is
this is a number that has a decimal point or A number without a fixed number of digits before and after the decimal point
what is a floating point number
this works by dedicating the first bit to the sign of the number when the first bit flips and negative numbers are being represented the largest negative number is the first number to be represented
how does twos complement work
using n bits in twos complement what is the expression for how many positive signed integers can be represented including 0
the amount of positive signed integers that can be represented including zero is
2^n / 2
using sign magnitude. if we have n bits what is the expression for the largest magnitude that can be represented
the expression for the largest magnitude that can be represented using n bits is
2^n/2 - 1
the expression for the amount of signed integers that can be represented is
2^n
using twos complement what is the expression for how many signed integers can be represented
when we have n bits the expression for the range of unsigned integers that can be represented including 0 is
2^n - 1
if we have n bits. what is the expression for the range of unsigned integers that can be represented when including 0
developed in 1963 this was a common way to represent letters and numbers in binary
what is ASCII and when was it developed
excluding zero the amount of negative signed integers that can be represented excluding 0 is
2^n/2
using n bits in twos complement what is the expression for how many negative signed integers can be represented excluding zero
the negative number with the largest magnitude that can be represented will be
2^n / 2
using n bits in twos complement what is the expression for the negative number with the largest magnitude that can be represented
what is ASCII and when was it developed
developed in 1963 this was a common way to represent letters and numbers in binary
how is a float represented in a computer
it is represented in binary scientific notation
** ****** *** ultimately means that it is possible to build any logic circuits using a combination of just two logic gates
- And gate and NOT gate
- OR gate and NOT gate
what does de morgans law ultimately mean
descibe the 1-bit full adder circuit
your following the sign magnitude algorithm for addition. the calculation you are performing involves a negative number and a positive number you have performed the calculation but now need to decide on the sign for the sum.
how is this achieved
by the algorithm after you have performed the calculation of a positive number and a negative number the sign of the sum can be found by looking back at the original calculation numbers and while still ignoring the signs decide which is greater the sign of that number will be the sign of the sum
the largest positive integer that can be represented is
2^n / 2 - 1
using n bits in twos compliment. what is the expression for the largest positive integer that can be represented
using twos complement what is the expression for how many signed integers can be represented
the expression for the amount of signed integers that can be represented is
2^n
how many inputs does the half adder have
the **** ***** has two inputs being the two bits you wish to add together
- any OR gate can be replaced by a combination of AND and NOT gates
- any AND gate can be replaced by a combination of OR and NOT gates
what two things does de morgans law tell us
an overflow will occur and the next number will display as a -8 that is 1000 in twos compliment
using twos compliment we have the binary number 0111. there are only four bits available. if 1 is added to this number what will happen
this has 3 inputs
- binary number a
- binary number b
- carry from the previous addition
how many inputs does the 1-bit full adder have
describe how the OR truth table would look
descibe how the OR logic gate is drawn
explain the technique of use arithmetic interchangeably to help mitigate overflow or underflow
one technique taken is to perform arithmetic interchangeable. that is, instead of performing many additions and multiplication or subtraction and division these should be used interchangeably with the intermediate value where possible.
what 4 bits do numbers start with in ASCII
numbers start with 0011
describe how the AND logic gate is drawn
this is able to add together binary numbers greater than 1 bit
what is the 1-bit full adder able to acomplish
what two things does de morgans law tell us
- any OR gate can be replaced by a combination of AND and NOT gates
- any AND gate can be replaced by a combination of OR and NOT gates
what 4 bits do lower case letters start with in ASCII
lower case letters start with 0110
describe how the NOT logic gate (inverter) is drawn
what are the two steps of the twos complement addition algorithm
- add the binary numbers
- discard the leftmost bit if the answer exceeds the number of available bits
who is augustus de morgan and what is he the founder of
he was a friend of george boole and is the founder of the de morgans law
how many outputs does the 1-bit full adder have
this has two outputs
- the sum
- the carry
using n bits in twos complement what is the expression for how many negative signed integers can be represented excluding zero
excluding zero the amount of negative signed integers that can be represented excluding 0 is
2^n/2
using n bits in twos complement what is the expression for the negative number with the largest magnitude that can be represented
the negative number with the largest magnitude that can be represented will be
2^n / 2
how does sign magnitude work
this works by dedicating the first bit to the sign of the number. all bits there after are the magnitude of the number.
this is made up of two half adders
describe what the 1-bit full adders logic circuit is made up off
this occurs when the number in the mantissa is to small to represent in binary. this happens because there are not enough bits available for the exponent
when does an underflow occur