Data representation Flashcards

1
Q

What do computers use to represent all types of data?

A

Binary (0s and 1s) are used to store numbers, text, colors, images, and videos.

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

Why do computers use binary?

A

Binary is based on electronic signals that can be ON (1) or OFF (0).

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

What is a logic gate?

A

A circuit that performs logical operations (AND, OR, NOT).

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

What is a truth table?

A

Shows all possible inputs and the result for each in a logic gate

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

What is a bit?

A

A single binary digit (0 or 1).

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

What is a byte?

A

8 bits grouped together.

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

What is a nibble?

A

4 bits grouped together.

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

How many possible values can a byte store?

A

256 values (2⁸).

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

How does binary counting work?

A

Same as decimal, but only using 0 and 1 (e.g., 0, 1, 10, 11, 100, 101, etc.).

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

How do you convert binary to decimal?

A

Multiply each bit by 2 to the power of its position, then add them all up

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

How do you convert decimal to binary?

A

Divide by 2, keep track of remainders, and read from bottom up.

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

What is ASCII?

A

A 7-bit character encoding system for text.

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

What is Unicode?

A

A way to represent text that works with many languages and symbols, like UTF-8, UTF-16, and UTF-32.

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

How are colors represented in binary?

A

Using RGB (Red, Green, Blue), each color is 8 bits, making a 24-bit color system.

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

What is a hexadecimal number?

A

A base-16 number system using digits 0-9 and letters A-F.

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

How do you convert hexadecimal to binary?

A

Change each hex digit into 4 binary bits

17
Q

How do you convert binary to hexadecimal?

A

Group bits into 4s from right to left, then convert each group to hex.

18
Q

What is an 8-bit color system?

A

Uses 256 colors (2⁸).

19
Q

What is the difference between sign-and-magnitude and two’s complement?

A

Sign-and-magnitude uses the first bit to show sign. Two’s complement shows negatives in a different way

20
Q

How do you find the two’s complement of a number?

A

Flip the bits and add 1.

21
Q

How does a computer perform binary addition?

A

Similar to decimal, but using carry rules for 1 + 1.

22
Q

How does a computer perform binary subtraction?

A

Uses two’s complement to turn subtraction into addition.

23
Q

What is binary multiplication by powers of 2?

A

Shifting left multiplies by 2, shifting right divides by 2.

24
Q

What is overflow in binary arithmetic?

A

Happens when the result is too big for the number of bits allowed

25
Q

What is floating-point representation?

A

A way to store real numbers using a sign bit, exponent, and mantissa.

26
Q

What is fixed-point representation?

A

A way to show real numbers with the decimal point always in the same place

27
Q

What is IEEE 754 format?

A

A standard way to store decimal numbers using 32 or 64 bits

28
Q

How do you add floating-point numbers?

A

Match the exponents, add the mantissas, then adjust the result

29
Q

Why is data representation important?

A

Makes sure data is stored efficiently and calculations are accurate in digital systems