Exam mistakes Flashcards
Why is Harvard Architecture preferred over Von Neumann
Instructions and data are accessed simultaneously
Instructions and data stored in parallel, so reduces ‘bottleneck’ problem
Avoids possibility of data being executed as code (which is one method that can be exploited by hackers)
When normalising a floating point number, when should the exponent be positive?
When you’re moving the decimal point to the left (so the exponent increases to accomodate for it)
When normalising a floating point number, when should the exponent be negative?
When you’re moving the decimal point to the right (so the exponent decreases to accomodate for it)
What effect does increasing the mantissa have?
- Decreases exponent, so reduces range but increases precision
What effect does increasing the exponent have?
- Decreases mantissa, so increases range but decreases precision
How many bits in a byte?
8
What are the steps required in converting from floating point to decimal?
Find value of exponent
Shift mantissa by bits of exponent
If mantissa is negative, convert to a positive value
How to find absolute error?
(intended value) - (actual represented value)
How to find relative error?
absolute error/intended value x 100
How do you create a table in SQL
CREATE TABLE tablename (
)
How do you add a column to a table?
ALTER TABLE tablename
ADD columnname Datatype
How do you delete a column in a table?
ALTER TABLE tablename
DROP COLUMN columnname
How do you change the datatype of a column?
ALTER TABLE tablename
MODIFY COLUMN columnname newdatatype
How do you insert values into a table?
INSERT INTO tablename(column1, column2…)
VALUES(value1, value2, …)
How do you update a record
UPDATE tablename
SET column1 = value1, column2 = value2 etc
WHERE columnX = Value