How Data is Held Flashcards

Binary and Character codes

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Binary?

A

A base 2 number system represented through the digits 1 and 0.

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

How is Binary stored in the Computer?

A

All data is held using on/ off signals

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

Why is Binary Used in computers?

A

Computer systems are based on switches, which can only have two states, on or off. Binary numbers use two digits. Binary is high tolerance and robust.

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

What Are Bits?

A

one binary digit 1 or 0

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

What is a Byte?

A

a group of 8 bits

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

What is a Nibble?

A

a group of 4 bits

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

List the place values of a byte in descending order

A

128, 64, 32, 16, 8, 4, 2, 1

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

How to convert Binary to Denary

A

Add up the values of all place values where there is a 1

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

How to convert Denary to Binary

A

Subtract place values from the denary starting with the highest. When you do this, put a 1 in that place value

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

What is Hexadecimal

A

A base 16 number system. The digits 0-9 are the same as denary, while the digits 10-15 are A-F alphabetically.

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

Why is Hexadecimal used

A

-easy to convert to and from binary
-easier to understand than binary

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

How to Convert Denary to Hexadecimal

A

divide the denary number by 16. The quotient goes in the 16s column, the remainder goes in the 1s column.

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

How to Convert Binary to Hexadecimal

A

Split the number into nibbles and write the matching hexa number under each group of 4.

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

How to convert Hexadecimal to Binary

A

Write 4 bits under each hexa digit

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

What is ASCII

A

A character set that represents each keyboard character (265 charas) as 8- bit binary codes.

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

What is Unicode

A

An extended character code sequence. Old ascii files can still be read with unicode.The first 8 bits of unicode are the same as ascii, but it used 16-32 bits so needs more storage space.

17
Q

What is included in Unicode

A
  • All global alphabets including braille.
  • Currency, maths, map, and musical symbols
  • Ancient languages eg. hieroglyphics
  • Codes for emojis and other pictures
  • Control and Formatting signs
18
Q

Who controls unicode

A
  • the unicode consortium
  • if you invent a new emoji or code you want to be used, you have to submit it to them . If they agree they will give it a code.
19
Q

How do different processors interpret unicode

A

Every make of computer / phone may interpret unicode characters slightly differently , eg apple vs android emojis look different.

20
Q

1)how to find the unicode for any character in python
2) how to find the character for any code number in python

A

(using the example c)
1) ord(“c”)

2) chr(67)

21
Q

how are negative binary numbers stored with sign and magnitude

A

the most significant bit stores the sign ( 0 for + , 1 for - )

22
Q

how are negative binary numbers stored with two’s compliment

A

The most signigicant bit is a negative value and the rest are positive

23
Q

what advantage does two’s compliment have over sign and magnitude

A

it can be used in calculations, whereas sign and magnitude can’t.

24
Q

how to convert a positive binary number to a negative using two’s compliment

A

flip all the bits, then increment the least significant bit

25
Q

list the four rules of binary addition

A

0+0 = 0
0+1 = 1
1+1 = 0 and carry 1
1+1+1 = 1 and carry 1

26
Q

how to subtract one binary number from another

A

turn the subtracted number negative using two’s compliment, then add both numbers together.

27
Q

How to use Binary shift to multiply or divide a binary number

A

Find the power of 2 for the number eg. x4 would be 2. Shift all the bits that many places to the left if multiplying, to the right if dividing

28
Q

what is overflow in multiplication or addition

A

if the result is too large, there will be a catty bit with nowhere to go. This is called an overflow and causes an error

29
Q

what is underflow in division

A

if the result of a division is a bit that “falls off” the right of the number, this is called underflow and causes an error.

30
Q

When is overflow not an error?

A

In subtraction.
if the subtracted number is smaller , the result will be positive. You will see an overflow bit, but this isn’t an error.

31
Q

What is Bitwise manipulation?

A

A way of processing binary values by changing the bits using logic rather than maths.

32
Q

What are three uses of bitwise manipulation?

A

-Encryption (XOR and others)
-Image processing. (OR processing can reconstruct an image from two damaged photos. )
-Noise reduction (AND can compare signal on both receivers)

33
Q

What are the three operators that can be used for bitwise manipulation?

A

AND = True if both are true
OR = True if at least one is true
XOR = True if the values are different

34
Q

How to perform masking?

A

The byte is altered by being merged with a second byte (the mask) using logical operations