Computer Number Systems Flashcards
Lecture 1 (22 cards)
What number systems are commonly used when coding embedded systems?
Binary and Hexadecimal
These systems are essential for digital electronics and programming.
What does the base of the Base Number System refer to?
It tells us how many unique digits there are in that number system
What is the base value of Unsigned Binary?
Base 2 [0,1]
What is the base value of Hexadecimal?
Base 16 [0-9 → A-F]
What is the value of 10111?
16+4+2+1=23₁₀
What is a Byte in terms of bits?
8 bits
What is a Nibble in terms of bits?
4 bits
What is a kB in terms of bytes and bits?
1024 bytes
8192 bits
What is MB in term of bytes and bits?
1024x1024 bytes
8388608 bits
What indicates an odd binary value?
A ‘1’ in its Least Significant Bit (LSB)
LSB is the bit at the end
What indicates an even binary value?
A ‘0’ in its Least Significant Bit (LSB)
LSB is the bit at the end
What is the process to convert Hexadecimal to Binary?
Divide the hex number into its digits, write the 4-bit binary value for each, and join them.
What is the conversion of F2₁₆ to binary?
11110010
How do you convert Binary to Hexadecimal?
Divide the binary number into 4-bit blocks, write the hex digit for each, and join them.
What is the decimal equivalent of the hexadecimal value 3F₁₆?
63
What do odd hexadecimal values have in their least significant digit position?
An odd hex digit (1, 3, 5, 7, 9, B, D, F)
What do even hexadecimal values have in their least significant digit position?
An even hex digit (0, 2, 4, 6, 8, A, C, E)
Is 0x4AC odd or even?
Even
Is 0x4A1 odd or even?
Odd
The word-length of a hexadecimal value is equal to …
4 x N bits, where N is the number of hexadecimal digits in the hexadecimal value
Examples:
* A3 is 4 x 2 bits = 8 bits = 1 byte
* BA4C is 4 x 4 bits = 16 bits = 2 bytes
* DDDDDDDD is 4 x 8 bits = 32 bits = 1 bytes
How do you do binary addition?
Rules
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + carry = 1 carry 1
1011 + 0011 = 1110
How do you do hexadecimal addition?
Just add the values together if it reaches F carry over 1