CS1 Flashcards

1
Q

Denary to binary

A

Successive or subtraction

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

Binary to decimal

A

Replaces ones with places and add

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

Binary addition

A

In binary addition change the 0 to a 1 if there is already a 1 then move that 1 to the left position

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

Hexadecimal

A
0
1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Hexadecimal to decimal

A

Use values to convert and then add all

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

Decimal to hexadecimal

A

Divide number by 16 then take the result of the final subtraction as the remeinder, repeat as much times as possible

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

Hexadecimal advantages

A

Shortcut to represent binary numbers

Two hex digits make 1 byte (8 bits)

Hexadecimal are used in colors, error messages, assembly languages programs, MAC addresses

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

Hexadecimal to binary

A

Separate the hexadecimal number by digits and then get the nibble then just write them together

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

Binary to hexadecimal

A

Separate the binary into nibbles and then convert those nibbles and write together

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

Storage units

A
8 bits = 1 byte 
(x1000)
1000 bytes = 1 Kilobyte
1,000,000 bytes = 1 Megabyte
1,000,000,000 bytes = 1 Gigabyte
1,000,000,000,000 bytes = Terabytes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Overflow

A

An overflow error occurs when a value outside this limit should be returned, this means that the largest number that a register can hold is exceeded.

An overflow error will occur if the value is greater than 255 in an 8-bit register

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

Shifts

A

Multiplications or divisions

2^0 = 1 shift = x or / 1
2^1 = 2 shifts = x or / 2
2^2 = 3 shifts = x or / 4
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Multiplication

A

Are left shifts, after shifting a zero is added to the right, if a 1 exceeds the limit then it will cause and overflow and we can loose data.

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

Division

A

Are right shifts, after shifting a zero is added to the left, a 1 bit can be lost, it doesn’t cause and overflow, but it loses accuracy.

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

What do you use to get negative binary numbers

A

Two’s complement

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

Binary is positive

A

MSB (Most Significant Bit) is 0

17
Q

Binary is negative

A

MSB (Most Significant Bit) is 1

18
Q

Two’s Complement

A

First convert the decimal number to binary
Obtain the 1’s complement (invert 0’s and 1’s)
Add 1

19
Q

Binary subtraction

A

Decimal to binary
positive number
+ negative number

20
Q

Negative other way

A

Use MSB as indicator and then add those positive to the negative one.

21
Q

How many bits ASCII code use?

A

7 bits

22
Q

What is ASCII used for?

A

To represent numbers, letter, punctuation and non printing commands.

23
Q

How many bits does extended ASCII use?

A

8 bits

24
Q

What does extended ASCII cover?

A

Non-English characters, graphics symbols and mathematical symbols.

25
Q

What does Unicode cover?

A

Works with different languages, non-English characters, graphics symbols, mathematical symbols and even emojis are also in unicode.

26
Q

How many bits does Unicode use?

A

UTF-8 uses 8, variable width (it allows expanding to more bits)
UTF-16 uses 16 bits, variable width (it allows expanding to more bits)
UTF-32 fixed-width encoding. Each character takes exactly 32-bits

27
Q

Bit depth in sound is?

A

The amount of bits that are used to cover sample values. (The more there are the better sound quality but also greater size)

28
Q

Sampling rate in sound is?

A

The rate at which the bit depth is sampled at. (measured in Hz or Hertz)

29
Q

How is sound recorded

A

Analog signal gets converted to digital and then it is interpreted and outputted.

30
Q

Sound File Size Formula

A

Size of audio file (bits) = Number of sample per second (Hz) ✖ Number of bits per sample (8 bit) ✖ Length of sample in seconds (Sec, if not in seconds, then convert)

31
Q

What is color depth in images

A

How many colors can be represented on an image. With a color depth of n bits, a computer can represent 2n different colors.

32
Q

RGB colors in images

A

Computer use RGB to represent colors by mixing values of red, green and blue. It uses hexadecimal values

33
Q

Image resolution

A

Width of pixels x height of pixels

34
Q

Image File Size Formula

A

File size (bits) = pixels width x pixels height x color depth (16 bit or whatever)

35
Q

Compression

A

A method of reducing file sizes, particularly in digital media such as photos, audio and video.

36
Q

Lossy

A

Means that data is lost forever.

It is good to use when specific file things aren’t needed. (Specific colors, shades, tones)

JPEG, Audio files and videos.

37
Q

Lossless

A

Means that no data is lost.

It is good when you want to compress a file but don’t want to loose anything. ( It does not achieve the same file size reduction as lossy compression.)

PDF, GIF, TIFF and PNG

38
Q

Compression advantages

A

Less internet bandwidth is needed to down/upload files.
Less storage space needed
Quicker to transfer
Smaller files reduce congestion on the internet.
Audio and video files can be streamed.