Chapter 1: Number Systems Flashcards

1
Q

Week 2

What is Data?

A

Data can come in the form of text, observations, figures, images, numbers, graphs, or symbols.

Data is a raw form of knowledge and, on its own, doesn’t carry any significance or purpose.

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

Week 2

What is a database?

A

Databases are used for storing, maintaining and accessing any sort of data.

That data is gathered in one place so that it can be observed and analyzed

A database essentially turns raw, unfiltered, and unorganized data into a coherent stream of coherent information in a way that allows it to be utilized by humans.

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

Week 2

How is data stored and processed by computers?

A

In 1’s and 0’s, also known as binary (base-2) code.

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

Week 2

How is data interpreted by humans?

A

Humans are taught to interpret data in decimal form (base-10).

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

Week 2

Describe the process used to convert decimal numbers to binary?

A

Let’s assume that we want to convert the decimal number 10 into binary.

To find decimal to binary equivalent, divide 10 successively by 2 until the quotient becomes 0. The binary equivalent can be obtained by writing the remainder in each division step from the bottom to the top.

For a more in-depth explanation, visit this link.

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

Week 2

How many bits are in a byte?

A

There are 8 bits in a byte.

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

Week 2

How many bits are in a nibble?

A

There are 4 bits in a nibble.

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

Week 2

How many bytes are in a word?

A

There are two bytes in a word (four nibbles)

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

Week 2

How is the concept of binary applied in black and white images?

A

Each pixel in a black and white picture is assigned a 1 or a 0

  • 1 indicates the presence of light i.e. the color white.
  • 0 indicates the complete absence of light i.e the color black.

Essentially, a black and white picture is a matrix of bits representing either the absence or presence of light.

Now, let’s expand upon this concept. Let’s assign each pixel an entire byte instead of a bit.

Now, each pixel can take on any of the 256 different shades of grey (including pure black and white).

  • 11111111 represents pure black.
  • 00000000 represents pure white.
  • 10101010 is an intermediate grey color.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Week 2

Describe the process used to convert binary to decimal.

A

As an example, let’s convert (10011001)2 into base-10

Write the binary number and count the power of 2 from right to left, starting from 0 onwards. Now each binary number has the corresponding power of 2 starting from right to left. So the most significant bit will have the highest power of 2.

For a more concise explanation, visit this link.

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

Week 2

Describe the process used to convert binary numbers to octal (base-8) numbers

A

**Converting From Binary to Octal (Base-8) **

Divide the bits into groups of 3. If the number of bits are not divisible by 3, add 0’s until they are.

For example 10011001 can be split into 010 011 001.

Notice how a supplementary 0 was added to the left of the byte in order to evenly divide it into three groups of three.

Now, convert each group of three bits to decimal.

  • (010)2 = (2)10
  • (011)2 = (3)10
  • (001)2 = (1)10

Hence (010011001)2 = (231)8

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

Week 2

Describe the process used to convert binary numbers to hexadecimal (base-16) numbers.

A

**Converting From Binary to Hexadecimal (Base-16) **

Divide the bits into groups of 4 (also known as nibbles). If the number of bits are not divisible by 4, add 0’s until they are.

For example 110011001 can be split into 0001 1001 1001.

Notice how three supplementary 0’s were added to the left of the byte in order to evenly divide it into three groups of four?

Now, convert each group of four bits to decimal.

  • (0001)2 = (1)10
  • (1001)2 = (9)10
  • (1001)2 = (9)10

Hence (000110011001)2 = (199)16

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

Week 2

Describe the process used to convert binary numbers to a base-n number.

A

First off, we need to find out how many groups we need to divide our bits into. Using the following relation, we can compute the answer to the question above

2x = n

Where x is the number of bits that each group should consist of, and n is the base of the number.

Divide the bits into groups of x bits. If the number of bits are not divisible by x, add 0’s until they are.

Now, convert each group of x bits to decimal.

Write the results obtained from left to right.

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

Week 2

How do you convert a decimal number to a number of base-n

A

Using the same method used to convert decimal numbers to binary numbers.

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

Week 2

How do you convert a base-n number to a decimal number.

A

The same method you use to convert binary numbers to decimal numbers

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

Week 2

How do you convert a base-n number to a binary number?

A

First off, we need to find out how many bits we need to assign to each digit in our base-n number. Using the following relation, we can compute the answer to the question above

2x = n

Where x is the number of bits that each digit should be turned into, and n is the base of the number.

Now, convert each digit in the base-n number into binary while making sure that each digit is converted into a binary group with x number of bits.

Write the results obtained from left to right.

17
Q

Week 2

What is ones’ complement?

A

The ones’ complement of a binary number is the value obtained by inverting (flipping) all the bits in the binary representation of the number.

For example, the one’s complement of 101001010 is 010110101.

18
Q

Week 2

What is twos’ complement?

A

Two’s complement is a mathematical operation to reversibly convert a positive binary number into a negative binary number with equivalent negative value, using the binary digit with the greatest place value as the sign to indicate whether the binary number is positive or negative.

It is computed by finding the ones’ complement of a given binary number, and adding 1 to it.

19
Q

Week 2

How do you add binary numbers?

A

Binary addition involves adding pairs of binary digits from right to left while considering carry values. Start with the least significant bits, add them along with any carry, and record the sum and carry. Repeat this process for each pair of bits, moving leftward. The final result is the sum of the binary numbers.

For a more concise explanation, watch the following YouTube video.

20
Q

Week 2

How do you subtract binary numbers?

A

Subtracting binary numbers is similar to decimal subtraction. Begin from the least significant bits. If the top digit is smaller than the bottom one, borrow 1 from the next higher bit. Subtract the digits along with any borrowed value and record the result. Repeat for each pair of bits, moving leftward, to get the binary difference.

For a more concise explanation, watch the following YouTube video.