Part 1 Block 1 - Binary Flashcards

1
Q

As we know, binary consists of ‘0’s and ‘1’s.
0, when the electricity is off, and 1 when it is on.
It is not quite as simple as this.
What is the range of volts for ‘0’ or off?
What is the range of volts for ‘1’ or on?

A

0 - 1.3v for ‘0’s
1.7+ for ‘1’s

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

Why is there a gap between 1.3v and 1.7v?

A

This gap means that if there is any small random dips or increases in the voltage (called noise), the two binary digits will still be distinguishable.

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

If the level of noise is too high, there is a small chance that the voltage might be pushed into the gap or even into the wrong range.
What is this called?

A

A bit error

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

If bit errors can occur, why not raise the voltage of the ‘1’s to widen the gap?

A

More voltage, more heat, more problems!

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

The process of combining the symbols (e.g. ‘0’s and ‘1’s) to represent data is called _____________?

A

encoding

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

If two or more number systems are being considered, we use a ______________ to show which representation is being used.

A

subscript

e.g. 1001 = 9
2 10

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

When we consider binary representations in the context of computing, we often talk about each symbol being stored in a bit. So how many bits would the binary number 1001 be?

A

4 bits long

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

Covert the denary number 53 into an 8-bit binary number.

A

0011 0101

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

When we write long binary numbers we divide them into groups of ____?

A

4

e.g. 00110101 becomes 0011 0101

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

An unsigned integer is an integer that is …?

A

Greater than or equal to zero and only ever positive.

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

What denary numbers could we represent with 3-bits (aka 2^3)

A

2^3 = 8
So, we can represent 8 denary numbers, 0-7

e.g. 000 = 0
001 = 1
010 = 2

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

What is the result of the following addition in binary?
110 + 101 =

What happens to the number of bits?

A

= 1011

The number of nits increases from 3-bits to 4-bits.

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

Can we represent negative numbers in binary?

A

Yes, we can.

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

How can we represent a negative denary number with a 3-bit binary number and what is it called?

A

We can use the first bit to represent either a positive or a negative.
e.g. a zero could rep a positive and a 1could rep a negative:

001 = 1
101 = -1

This representation is called:
sign-magnitude representation

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

If we have 4 bits, which means 2^4, so 16 different integers that can be encoded, how many can be used to represent negatives?

A

As we know, the rule in sign magnitude representation is that if we have n bits available, there will be 2^n possible encodings.

Half of them, so 2^n/2, will be used to represent 0 and positive integers, and half of them will be used to -0 and the other negative integers.

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

Regarding positive and negative numbers in the sign-magnitude representation, the formula for how many numbers can be positive or negative is 2^n/2-1.

What is the largest positive binary number that can be written in 4 bits in the sign-magnitude representation?

A

7

17
Q

What is the drawback of sign-magnitude representation?

A

There are two representations of 0.
+0 and -0

18
Q

Find the sum of the following sign-magnitude numbers:

0010 + 1111

A

(0010 is positive and 1111 is negative)

1101 (remember, the first 1 stands for
the negative sign)

19
Q

Is there a negative zero in the two’s complement representation of binary?

A

No

20
Q

In the two’s complement representation of binary, what happens to the block of negative numbers?

A

We shift them to the left.

21
Q

Are there still as many binary encodings available in the Two’s Complement Representation?

A

Yes, it is still 2^n

22
Q

Are there still 2^n/2 encodings available for both the positives and the negatives?

A

Yep!

23
Q

What is the largest positive integer that can be represented in n-bit two’s complement?

What is the negative integer with the largest magnitude that can be written in n-bit two’s complement.

A

2^n/2 - 1

-2^n/2

24
Q

Two’s Complement Representation

What is the largest positive decimal integer that can be written in 8-bit two’s complement representation?

A

127

25
Q

Two’s Complement Representation

What is the 8-bit two’s complement binary encoding of the largest positive decimal integer?

A

0111 1111

26
Q

Two’s Complement Representation

What is the negative decimal integer with the largest magnitude that can be written in an 8-bit two’s complement representation?

A

–128

27
Q

Two’s Complement Representation

What is the 8-bit binary encoding of the negative decimal integer with the largest magnitude?

A

1000 0000

28
Q

Two’s Complement Representation

What is the two’s complement encoding of 0 in 8-bit two’s complement representation?

A

0000 0000

29
Q

Complete the following addition problems in two’s complement.

a.4 + (–1)
b.–5 + 2
c.–4 + (–3)

A

a) 0011

b) 1101

c) 1001

30
Q

What is UTF-8?

A

the standard encoding system for characters - Unicode Transformation Format-8
It uses a variable number of bytes (up to 6) to encode characters in use across the world.

31
Q
A