Number Systems Flashcards
Why must data be converted to binary to be processed by a computer?
Data has to be converted to binary to be processed by a computer because computers are built using switches that can either be on or off, which fits the binary number system (1/0).
Define binary data.
Binary data is data represented using the binary number system, consisting of only two digits: 1 and 0.
Define binary number system.
The binary number system is a base-2 number system that represents numbers using only two digits: 0 and 1.
What is the advantage of processing data in binary format for computers? (3)
allows computers to perform:
- complex calculations
- store vast amounts of data efficiently
- operate at incredible speeds.
What is denary?
Denary is a base-10 number system made up of 10 digits (0-9), where each digit has a weight factor of 10 raised to a power.
What is hexadecimal?
Hexadecimal is a base-16 number system made up of 16 digits, including 10 numbers (0-9) and 6 letters (A-F).
How many unique values can one hexadecimal digit represent?
16 unique values (0-F).
What is the largest decimal number that can be represented by 8 bits in binary?
255 (11111111 in binary)
How many bits does one hexadecimal digit represent?
4 bits (half a byte or one nibble)
Define nibble.
A nibble is four bits of binary data or half a byte.
Define byte.
A byte is a unit of digital information that consists of 8 bits.
What is the definition of bit?
A bit is a basic unit of information in computing, representing either a 0 or 1.
Why is hexadecimal preferred when working with large values in Computer Science?
Hexadecimal is preferred because:
- it takes fewer digits to represent a given value than binary making it easier to read
- less prone to errors when copying.
Define MAC address.
A unique identifier for network interfaces, typically consisting of 12 hexadecimal digits which is equivalent to 48 digits in binary.
What is the format of a typical hexadecimal color code?
A typical hexadecimal color code consists of 6 hexadecimal digits, equivalent to 24 digits in binary. Each two-digit pair represents the colors red, green, and blue
Define URL encoding.
The process of converting characters in a URL that are outside the standard set into hexadecimal codes.
What are three common uses of hexadecimal in computing?
- MAC addresses
- URL encoding
- Color codes
Define overflow error.
An overflow error occurs when a result is too large to be represented in the available storage space (needs more bits)
What is 1 + 1 in binary addition?
1 + 1 = 10 (2 in denary)
Define binary shift.
A binary shift is how a computer system performs basic multiplication and division by moving binary digits left or right a set number of times.
What does a left shift do?
A left shift multiplies a binary number by 2 (for every 1 place shift).
What does a right shift do?
A right shift divides a binary number by 2 (for every 1 place shift).
Define underflow error.
An underflow error occurs when a result is too small to be represented in the available storage space.
In binary shifts, what is the definition of precision?
In binary shifts, precision refers to the number of digits used to represent a value.
Define Two’s complement.
A method of using signed binary values to represent negative numbers, where the leftmost bit is designated as the most significant bit (MSB).
How is a negative number represented in two’s complement?
In two’s complement, a negative number is represented by setting the most significant bit (MSB) to 1.
Define MSB.
The Most Significant Bit, which in two’s complement represents the sign of the number (0 for positive, 1 for negative).
State one effect this logical shift has on the binary number
- Value becomes incorrect
Give two reasons why a programmer may use hexadecimal to represent binary numbers
- Shorter representation
- Easier to write