Assembly Final Review Flashcards
Unsigned integer
Integers that can only represent nonnegative whole numbers. Ex: an 8 bit unsigned integer can represent values 0 from 255.
Horner’s scheme
A method to evaluate decimal values of a number. Start with writing the first number of the number times 1 minus the length of the number until you get to 0. If its not binary then multiply by the base.
Ex: 10010011
(1x2^7)+(0x2^6)+(0x2^5)+…+(1x2^0)
–>((((((1x2+0)2+0)2+1)…))))))
2’s complement
Binary representation scheme used for signed integers. Positive numbers are the same as sign magnitude. For negative numbers, invert all the bits and add 1.
Bitwise operations
And, Or and Xor
And returns 1 if both bits are 1, Or returns 1 if either are 1, and Xor returns 1 if either are 1 but not both
What is Unicode?
A coding scheme on how to represent characters using 16 bits or more
How do you convert decimal (base 10) to binary?
Repeated division method
Signed integer
Can represent both pos and neg integers
How to represent numbers in sign magnitude
Find out how many bits youll need by finding what power you need for 2. The result can’t be bigger than the number. Ex: 468, 2^8 = 256, 2^9 = 512 which is too big. Subtract 256 from 468 and if the result is positive then add 1 to the beginning of binary num, 0 otherwise.
Sign magnitude
For positive numbers, the sign bit is 0 and 1 for negative numbers
One’s complement
Same as sign magnitude but inverted
Instruction
Task in mips with 2 main parts, opcode and operand
Register
Fastest kind of storage device located on processor
Bit shifting
Moving bits of a binary number left or right.
CISC
Complex Instruction Set Computing: supports a large set of complex instructions
Advantages: Can do complex operations in 1 instruction
Disadvantages: Increased complexity can lead to longer runtimes and higher costs
RISC
Reduced Instruction Set Computing: supports smaller set of simple instructions
Advantages: Simplified instruction set allows for easier pipelining and faster execution
Disadvantages: May require more instructions to do complex operations