Chapter 1: Number Systems Flashcards
Week 2
What is Data?
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.
Week 2
What is a database?
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.
Week 2
How is data stored and processed by computers?
In 1’s and 0’s, also known as binary (base-2) code.
Week 2
How is data interpreted by humans?
Humans are taught to interpret data in decimal form (base-10).
Week 2
Describe the process used to convert decimal numbers to binary?
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.
Week 2
How many bits are in a byte?
There are 8 bits in a byte.
Week 2
How many bits are in a nibble?
There are 4 bits in a nibble.
Week 2
How many bytes are in a word?
There are two bytes in a word (four nibbles)
Week 2
How is the concept of binary applied in black and white images?
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.
Week 2
Describe the process used to convert binary to decimal.
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.
Week 2
Describe the process used to convert binary numbers to octal (base-8) numbers
**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
Week 2
Describe the process used to convert binary numbers to hexadecimal (base-16) numbers.
**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
Week 2
Describe the process used to convert binary numbers to a base-n number.
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.
Week 2
How do you convert a decimal number to a number of base-n
Using the same method used to convert decimal numbers to binary numbers.
Week 2
How do you convert a base-n number to a decimal number.
The same method you use to convert binary numbers to decimal numbers