part 1, binary data representation and computation Flashcards

1
Q

explain what a logic circuit is

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how many representations of 0 does twos compliment have

A

this has only one representation of 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

with this a 0 represents a positive (+) and a 1 represents a negative (-)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

upper case letters start with 0100

A

what 4 bits do uppercase letters start with in ASCII

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what are the 3 distinct parts of scientific notation

A
  1. a sign
  2. a mantissa (the decimal part beginning with digits 0-9 )
  3. an exponent (the power of 10)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

this is a standard used to represent numbers and letters that are currently in use across the globe it became the standard in 2007

A

what is UTF-8 and when did it become the standard to be used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does de morgans law ultimately mean

A

** ****** *** ultimately means that it is possible to build any logic circuits using a combination of just two logic gates

  1. And gate and NOT gate
  2. OR gate and NOT gate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

this has only one representation of 0

A

how many representations of 0 does twos compliment have

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

this uses 8 bytes to store a floating point number

A

how many bytes does a double (double precision) use to store a float

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A

describe how the truth table for the NOT operation would look with an input of A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. a sign
  2. a mantissa (the decimal part beginning with digits 0-9 )
  3. an exponent (the power of 10)
A

what are the 3 distinct parts of scientific notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

this works by outputing a 1 if two or more inputs are both 1

A

explain how the AND operation works

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the original 7-bit ASCII has been preserved by this standard

A

what has been preserved by UTF-8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

this uses a variable amount of bytes up to 6

A

how many bytes does UTF-8 use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is a truth table

A

a truth table will take all possible inputs and then output all the posssibilitys of the operation you are performing on the inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

how far apart are lower case letters and upper case letters in ASCII

A

they differ by 32 this is because the 32nd bit is flipped on or off depending on using lower or upper case letter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

this is any integer greater than or equal to 0

A

what is an unsigned integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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}

A

explain the technique of using a programming languages max value constant to help avoid an overflow when using addition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what is sign magnitude

A

this is a type of encoding that allows for signed integers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

he was a friend of george boole and is the founder of the de morgans law

A

who is augustus de morgan and what is he the founder of

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

if we have n bits. what is the expression for the amount of unsigned integers that can be represented

A

the amount of unsigned integers that can be represented is 2^n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what has been preserved by UTF-8

A

the original 7-bit ASCII has been preserved by this standard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

how many bytes does a typical float have

A

this has 4 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
1. it can cause overflow 2. 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
26
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?
27
1. a sign 2. a mantissa (the decimal part. always begins with 1) 3. an exponent (a power of 2)
what are the 3 rules for scientific notation for binary numbers
28
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
29
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
30
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
31
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
32
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
33
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
34
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
35
developed in 1963 this was a common way to represent letters and numbers in binary
what is ASCII and when was it developed
36
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
37
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
38
what is ASCII and when was it developed
developed in 1963 this was a common way to represent letters and numbers in binary
39
how is a float represented in a computer
it is represented in binary scientific notation
40
\*\* \*\*\*\*\*\* \*\*\* ultimately means that it is possible to build any logic circuits using a combination of just two logic gates 1. And gate and NOT gate 2. OR gate and NOT gate
what does de morgans law ultimately mean
41
descibe the 1-bit full adder circuit
42
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
43
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
44
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
45
how many inputs does the half adder have
the \*\*\*\* \*\*\*\*\* has two inputs being the two bits you wish to add together
46
1. any OR gate can be replaced by a combination of AND and NOT gates 2. any AND gate can be replaced by a combination of OR and NOT gates
what two things does de morgans law tell us
47
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
48
this has 3 inputs 1. binary number a 2. binary number b 3. carry from the previous addition
how many inputs does the 1-bit full adder have
49
describe how the OR truth table would look
50
descibe how the OR logic gate is drawn
51
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.
52
what 4 bits do numbers start with in ASCII
numbers start with 0011
53
describe how the AND logic gate is drawn
54
this is able to add together binary numbers greater than 1 bit
what is the 1-bit full adder able to acomplish
55
56
what two things does de morgans law tell us
1. any OR gate can be replaced by a combination of AND and NOT gates 2. any AND gate can be replaced by a combination of OR and NOT gates
57
what 4 bits do lower case letters start with in ASCII
lower case letters start with 0110
58
describe how the NOT logic gate (inverter) is drawn
59
what are the two steps of the twos complement addition algorithm
1. add the binary numbers 2. discard the leftmost bit if the answer exceeds the number of available bits
60
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
61
how many outputs does the 1-bit full adder have
this has two outputs 1. the sum 2. the carry
62
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
63
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
64
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.
65
this is made up of two half adders
describe what the 1-bit full adders logic circuit is made up off
66
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
67
what does ASCII stand for
American standard code for information interchange
68
positive values start with a 0. the same as sign magnitude
what bit do positive values start with in twos compliment
69
when does an underflow occur
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
70
the \*\*\*\* \*\*\*\*\* is able to add together 2 single bits
what is the half adder able to perform
71
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
with this a 0 represents a positive (+) and a 1 represents a negative (-)
72
this occurs when the integer required exceeds the number of bits available
when does overflow occur
73
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 negative numerical value, -n. What is the algorithm for doing this?
Subtract 00110000 from the ASCII code and add 1000 0000
74
the 1 in the mantissa before the decimal point is not stored by the computer. this is because it is always a 1 and so is usually hardwired into the processors floating point unit
when a computer stores a float or a double which part is never stored
75
describe how the AND logic gate is drawn
76
the expression for the largest magnitude that can be represented using n bits is 2^n/2 - 1
using sign magnitude. if we have n bits what is the expression for the largest magnitude that can be represented
77
1. add the binary numbers 2. discard the leftmost bit if the answer exceeds the number of available bits
what are the two steps of the twos complement addition algorithm
78
2^3=8 so the answer is 8 unsigned integers can be represented by 3 bits
if we have 3 bits how many unsigned integers can be represented
79
unicode transformation format-8
what does UTF-8 stand for
80
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
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
81
how does twos complement work
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
82
describe what logic operations are and name there inventor
these perform operations on on a given iput or inputs. the inventor of these was george boole
83
explain how the AND operation works
this works by outputing a 1 if two or more inputs are both 1
84
by the algorithm to add a negative number and a positive number you must ignore the signs and subtract the smaller number from the larger number
your following the sign magnitude algorithm for addition. the calculation you are performing involves a negative number and a positive number by the algorithm what is the next step to add these numbers
85
if we have n bits. what is the expression for the range of unsigned integers that can be represented when including 0
when we have n bits the expression for the range of unsigned integers that can be represented including 0 is 2^n - 1
86
this is a popular type of encoding that allows for signed integers
what is twos complement
87
how many inputs does the 1-bit full adder have
this has 3 inputs 1. binary number a 2. binary number b 3. carry from the previous addition
88
what is a floating point number
this is a number that has a decimal point or A number without a fixed number of digits before and after the decimal point
89
the computer would say the equality is false even though it is true. this is because of the precision problem computers suffer from
if you asked a computer for the equality of 0.1 + 0.1 + 0.1 = 0.3. what would its answer be and why
90
describe the half adder circuit
91
these perform operations on on a given iput or inputs. the inventor of these was george boole
describe what logic operations are and name there inventor
92
describe how the OR operation works
this works by outputting 1 (true) if either or both the inputs is a 1 (true)
93
descibe how the OR logic gate is drawn
94
how many bytes does UTF-8 use
this uses a variable amount of bytes up to 6
95
1. the first bit is assigned to the sign. 0 for positive 1 for negative 2. the next 8 bits are the exponent 3. the mantissa is the last 23 bits
a computer typically stores a float using 4 bytes but how does it use this memory
96
what is twos complement
this is a popular type of encoding that allows for signed integers
97
describe what the 1-bit full adders logic circuit is made up off
this is made up of two half adders
98
this works by outputting 1 (true) if either or both the inputs is a 1 (true)
describe how the OR operation works
99
by the algorithm if both signs are negative for the numbers you are adding then there sum will also be negative. this same rule applies for positive numbers. if both signs are positive for the numbers you are adding then there sum will also be positive.
your following the sign magnitude algorithm for addition. you have two calculations one is adding two negative numbers together the other is adding two positive numbers together. by the algorithm for each calculation how would you handle the sign for the sum of each calculation
100
the amount of unsigned integers that can be represented is 2^n
if we have n bits. what is the expression for the amount of unsigned integers that can be represented
101
if we have 3 bits how many unsigned integers can be represented
2^3=8 so the answer is 8 unsigned integers can be represented by 3 bits
102
describe how the truth table for the AND operation would look
103
what are the 3 rules for scientific notation for binary numbers
1. a sign 2. a mantissa (the decimal part. always begins with 1) 3. an exponent (a power of 2)
104
what are two important notes about the twos complement addition algorithm
1. it can cause overflow 2. it is able to be used for subtraction, division and multiplication, by turning each of these calculations into an addition problem
105
it is represented in binary scientific notation
how is a float represented in a computer
106
describe how the NOT logic gate (inverter) is drawn
107
describe how the OR truth table would look
108
this has 4 bytes
how many bytes does a typical float have
109
American standard code for information interchange
what does ASCII stand for
110
describe the half adder circuit
111
a computer typically stores a double using 8 bytes but how does it use this memory
1. the first bit is assigned to the sign. 0 for positive 1 for negative 2. the next 11 bits are the exponent 3. the mantissa is the last 52 bits
112
the amount of positive signed integers that can be represented including zero is 2^n / 2
using n bits in twos complement what is the expression for how many positive signed integers can be represented including 0
113
how many outputs does the half adder have
the \*\*\*\* \*\*\*\*\* has two outputs 1. the sum 2. the carry
114
describe the half adder symbol
115
how many bytes does a double (double precision) use to store a float
this uses 8 bytes to store a floating point number
116
1. the NOT operation 2. the AND operation 3. the OR operation
name 3 common logic operations
117
lower case letters start with 0110
what 4 bits do lower case letters start with in ASCII
118
what bit do positive values start with in twos compliment
positive values start with a 0. the same as sign magnitude
119
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
an overflow will occur and the next number will display as a -8 that is 1000 in twos compliment
120
1. use arithmetic interchangeable (+, -, +) instead of (+, +, +) or (/, x, /) instead of (/, /, /) 2. make use of the programming languages max and min constant values
what are two techniques taken that can help mitigate overflow or underflow
121
describe how the truth table for the AND operation would look
122
your following the sign magnitude algorithm for addition. you have two calculations one is adding two negative numbers together the other is adding two positive numbers together. by the algorithm for each calculation how would you handle the sign for the sum of each calculation
by the algorithm if both signs are negative for the numbers you are adding then there sum will also be negative. this same rule applies for positive numbers. if both signs are positive for the numbers you are adding then there sum will also be positive.
123
your following the sign magnitude algorithm for addition. the calculation you are performing involves a negative number and a positive number by the algorithm what is the next step to add these numbers
by the algorithm to add a negative number and a positive number you must ignore the signs and subtract the smaller number from the larger number
124
describe how the truth table for the NOT operation would look with an input of A
125
if you asked a computer for the equality of 0.1 + 0.1 + 0.1 = 0.3. what would its answer be and why
the computer would say the equality is false even though it is true. this is because of the precision problem computers suffer from
126
it handles this by giving the closest value it can, given the number of bits it has
how do computers handle a sum such as 1/3 which is an infinite repeating decimal
127
using n bits what will the binary representation be for the negative number with the largest magnitude
using n bits the binary representation for the negative number with the largest magnitude will be 1 followed by all n 0s
128
explain the technique of using a programming languages max value constant to help avoid an overflow when using addition
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}
129
how does the NOT operation work
this works by flipping the bit
130
a computer typically stores a float using 4 bytes but how does it use this memory
1. the first bit is assigned to the sign. 0 for positive 1 for negative 2. the next 8 bits are the exponent 3. the mantissa is the last 23 bits
131
name 3 common logic operations
1. the NOT operation 2. the AND operation 3. the OR operation
132
this is a type of encoding that allows for signed integers
what is sign magnitude
133
how is the number 0 represented in sign magnitude
this represents 0 twice. firstly as +0 then again as -0
134
this is a combination of logic gates that can perform more complex operations and outputs than could be accomplished with a single logic gate
explain what a **logic circuit** is
135
Subtract 00110000 from the ASCII code and add 1000 0000
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 negative numerical value, -n. What is the algorithm for doing this?
136
numbers start with 0011
what 4 bits do numbers start with in ASCII
137
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?
Subtract 00110000 from the ASCII code
138
a truth table will take all possible inputs and then output all the posssibilitys of the operation you are performing on the inputs
what is a truth table
139
descibe the 1-bit full adder symbol
140
what 4 bits do uppercase letters start with in ASCII
upper case letters start with 0100
141
describe the half adder symbol
142
what is the 1-bit full adder able to acomplish
this is able to add together binary numbers greater than 1 bit
143
144
what are two techniques taken that can help mitigate overflow or underflow
1. use arithmetic interchangeable (+, -, +) instead of (+, +, +) or (/, x, /) instead of (/, /, /) 2. make use of the programming languages max and min constant values
145
when a computer stores a float or a double which part is never stored
the 1 in the mantissa before the decimal point is not stored by the computer. this is because it is always a 1 and so is usually hardwired into the processors floating point unit
146
what is UTF-8 and when did it become the standard to be used
this is a standard used to represent numbers and letters that are currently in use across the globe it became the standard in 2007
147
what bit do negative values start with in twos complement
negative values start with a 1. the same as sign magnitude
148
the \*\*\*\* \*\*\*\*\* has two inputs being the two bits you wish to add together
how many inputs does the half adder have
149
when does overflow occur
this occurs when the integer required exceeds the number of bits available
150
how do computers handle a sum such as 1/3 which is an infinite repeating decimal
it handles this by giving the closest value it can, given the number of bits it has
151
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.
explain the technique of use arithmetic interchangeably to help mitigate overflow or underflow
152
what does UTF-8 stand for
unicode transformation format-8
153
this works by dedicating the first bit to the sign of the number. all bits there after are the magnitude of the number.
how does sign magnitude work
154
descibe the 1-bit full adder symbol
155
this works by flipping the bit
how does the NOT operation work
156
1. the first bit is assigned to the sign. 0 for positive 1 for negative 2. the next 11 bits are the exponent 3. the mantissa is the last 52 bits
a computer typically stores a double using 8 bytes but how does it use this memory
157
what is the half adder able to perform
the \*\*\*\* \*\*\*\*\* is able to add together 2 single bits
158
this represents 0 twice. firstly as +0 then again as -0
how is the number 0 represented in sign magnitude
159
this has two outputs 1. the sum 2. the carry
how many outputs does the 1-bit full adder have
160
negative values start with a 1. the same as sign magnitude
what bit do negative values start with in twos complement
161
using n bits the binary representation for the negative number with the largest magnitude will be 1 followed by all n 0s
using n bits what will the binary representation be for the negative number with the largest magnitude
162
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
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
163
the \*\*\*\* \*\*\*\*\* has two outputs 1. the sum 2. the carry
how many outputs does the half adder have
164
they differ by 32 this is because the 32nd bit is flipped on or off depending on using lower or upper case letter
how far apart are lower case letters and upper case letters in ASCII
165
what is an unsigned integer
this is any integer greater than or equal to 0
166
descibe the 1-bit full adder circuit
167
in binary ASCII what do each of these begin with 1. number 2. lowercase letters 3. uppercase letters