Home
Subjects
Textbook solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Binary 1
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (33)
How do positional numbering systems work?
digits represent different numbers based on their relative position.
humans use the decimal system (aka base 10) to represent numbers
modern computers use binary (base 2)
What is radix notation?
Use radix notation to distinguish between numbers in different bases (used for arithmetic) e.g. 10010_2
What is prefix notation?
can also use prefix notation (used for programming) e.g. 0b for binary
How are bits grouped?
bits are grouped into series of 8 (byte) or 4 (nybble)
What ways are there to convert decimal numbers to other bases?
1. subtraction
2. division remainder
What is the subtraction method?
1. use 2^n -1 to work out the max value n bits can represent e.g. 2^4 -1 = 15
2. repeatedly subtraction from the highest power
3. write 1 when making a subtraction & 0 if you didn't
What is the division-remainder method?
1. long division of the number you want to convert by the radix
2. read the remainders from bottom to top to get the number
How do you convert fractional components to binary?
same process of subtraction method but using negative powers e.g. 0.101_2 = 1x2^-3 + 1x2^-1 = 0.625_10
What do you do if a fractional component has an infinite series of digits in other bases?
e.g. 0.3_10 to binary, 2/3= 0.6666..._10 = 0.2_3
Instead specify how many digits of accuracy you are using e.g. 5 bits of accuracy to the right of the binary point
What binary formats are there?
1. unsigned binary
2. signed binary
3. one's complement
2. two's complement
What is unsigned binary?
binary form so far, can't represent negative values
What is signed magnitude?
The most significant bit is the sign bit (represents the sign of the number): 0 = positive, 1 = negative
The remaining bits are interpreted as unsigned binary (the magnitude)
What are the advantages of signed magnitude?
simple & intuitive representation (similar to decimal)
easy to convert unsigned values to positive signed values
What are the disadvantages of signed magnitude?
signed bit makes it difficult to perform arithmetic
2 representations of 0: positive 0 byte= 0000 0000, negative 0 byte = 1000 0000 (makes no sense mathematically)
What is the one's complement of a binary bit?
0 —> 1 (one's complement of 0 is 1)
1 —> 0 (one's complement of 1 is 0)
What is the one's complement of a number?
One's complement of a number is it's negative representation. The most significant bit is the signed bit. 0 = positive, 1 = negative
How do you convert a number to one's complement?
1. convert number into unsigned binary
2. add leading 0s to get the specified number of bits
3. if the number is negative, flip all the bits to get the one's complement. if it is positive, there is no need to flip
4. if the number starts with a leading 1 it is interpreted as negative. if it starts with a 0 it is interpreted as positive
What are the advantages of one's complement?
addition using one's complement is easy, therefore simple circuits to do arithmetic
What are the disadvantages of one's complement?
still 2 representations of 0: positive zero byte = 0000 0000, negative zero byte = 1111 1111
What is two's complement?
the most significant bit is negative version of the binary column e.g. -8
0 = positive number
How do you convert positive decimals to two's complement?
convert into unsigned binary & add a leading bit with the value 0
How do you convert negative decimals to two's complement?
convert the decimal into one's complement & add 1 to the value
How do you convert -13 to two's complement?
13 = 1101
01101
one's complement: 10010
10010 + 1 = 10011
-13 = 10011
How do you convert 11 to two's complement?
11 = 1011
+11 is 01011
What are the advantages of two's complement?
no bits with special meanings (sign bits), therefore simple circuits (same hardware can be used to perform both signed & unsigned arithmetic)
single representation of 0: 0000 0000
What are the disadvantages of two's complement?
none- most widely used format in modern computer systems
When is hexadecimal used?
used when binary numbers become moderately large (difficult to read) as hexadecimal is more readable
How do you convert a binary number to hexadecimal?
1. group the binary number into nybbles
2. convert each separate nybble to decimal
3. each nybble now translates to 1 hexadecimal character
What is the prefix for hexadecimal?
prefix is 0x
Why is binary used for computer systems?
binary is used because of the properties of the physical hardware that is used:
1. transistors have an on and & off state (maps easily into binary)
2. it's efficient for computing the logic of computation e.g. boolean logic
What base did mechanical computers use?
mechanical computers (no electricity) used cogs & gears instead of transistors so used decimal or ternary (base-3)
Why do quantum computers not use binary?
quantum computers don't use transistors & quantum logic doesn't consider 2 states like boolean logic
How do you convert negative binary to hexadecimal?
Converting negative binary to hex is the same as normal conversion (need context to tell what it is)
Sets found in the same folder
Essentials of Computer Systems
48 terms
Binary 2
23 terms
Binary 3
42 terms
Assembly 1
67 terms
Other sets by this creator
10 Sorting Algorithms
21 terms
9 Search Tree Structures
10 terms
8 Maps, Hash Tables & Dictionaries
49 terms
7: Priority Queues & Heaps
44 terms