Computer systems (binary) Flashcards

1
Q

Describe how binary is used to show positive integers

A

using 8 bit the way that we show a positive integer in binary is through 1’s and 0’s . Every number doubles itself (ex . 1-2-4…)and the way you look at it is from right to left .

the code will look like this:
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 = 0

to represent the number 42 you would do:

00101010 = 42

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

Describe how binary is used to show negative integers

A

The way binary is used to display negative integers is by using two’s complement . This is where the first number of the binary 8 bit code starts with a one(on the left side and this then indicated that the number is negative ). An example of this would be :

10000000 = -128
another example using four bits :

1111 = -1

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

What are the advantages of using twos complement when displaying negative numbers ?

A

The advantages are that :

-there is only one zero
-the first bit indicates whether the number is positive or negative
-addition and subtraction are easy to implement

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

How can the range of positive numbers be displayed ?

A

The way that the range of the positive and the negative numbers can be displayed are through using the rule 2^n -1

an example of this would be :(lets use 8 bits)
from 0 to 2^8 = 0-256
then minus the one = 255

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

How can the range of positive and negative numbers be displayed ?

A

The way that the range of the positive and the negative numbers can be displayed is by just doing for the negative numbers -2^n-1 and for the positive numbers you do 2^n-1 -1

and example of this would be:
8 bits can represent the range of positive and negative numbers
from -28-1 to 28-1 - 1
= -27 to 27 - 1
= -128 to 128 - 1
= -128 to 127

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

How can real numbers be displayed using the mantissa an the exponent

A

-The mantissa stores the significant digits of the number.

-The exponent stores a value which indicates where the decimal point should be placed.

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

`Give an example of how this works

A

Show how the value 1001.001 would be stored using floating point representation, with 16 bits for the mantissa (including a signed bit) and 8 bits for the exponent.

so the first thing that we need to do is to identify if the number is negative or positive and then we can determine this is there is a minus or positive sign ,in this case it is a positive so the sign will equal

sign = 0

then to work out the mantissa we look at where the first 1 starts and then we count it to were the last one ends and we add on zero to that unit there are 15 bits

mantissa = 100100100000000

then the way that we work out the exponent is by looking at the decimal point is then and then we look at how man decimal point it takes to get to the front of the 1.

this case it is 00000100

when we look at the exponent it may have to to to tot he right side and then in this case the number will be mnegative

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

Another example of this but a harder one (exam standard)

A

Write the following binary number using floating‑point representation.
−111 0000 1111.0101
There are 16 bits for the mantissa (including the sign bit) and 8 bits for the
exponent.

So first we need to find the sign and the way that we are going to do this was by looking at the sign in the question , here it is negative so the sign was going to be 1

sign =1

now for the mantissa

mantissa = 111000011110101

the exponent this will be going to the left therefor the exponent will not be negative

exponent = 0000 1011

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

What is the impact of changing the exponent and the mantissa size

A

Increasing the mantissa

-Increasing the number of bits used to store the mantissa:
increases the precision of the number.

-decreases the number of bits available for the exponent, and so the range of the number is decreased.

Increasing the exponent

-Increasing the number of bits used to store the exponent:
increases the range of the number.

-decreases the number of bits available for the mantissa, and so the precision of the number is decreased.

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

What is Unicode and what are the benefits of it over the standard ASCII and Extended ASCII

A

ASCII only uses 7 bits to hold information and then extended ASCII uses 8 bits there can only represent 7 = 128 and 8 bits =256

But with Unicode you can represent 16 bits and this is 65,536 characters, therefore it can store more characters and it can store more emojis and different languages compared to extended ASCII and normal ASCII but the only drawback is that it needs more storage to store a character ( double than ascii) at two bytes.

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

What are the advantages and the disadvantages of bitmapped graphics

A

ADVATAGES :

That individual pixels can be edited
that it can produce photorealistic images

DISADVATAGES :

that the resolution is set and when you trey and change it , it will lose quality
Has a larger file size than vector graphics

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

What are the advantage and the disadvantages of vector graphics

A

ADVATAGES :

That individual objects can be edited
when you try and increase the quality of the image it will not lose quality

DISADVANTAGES :

no control over pixel-level editing
unsuitable for photo-realistic images

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