Chapter 0: Problem 1
Convert the following decimal numbers to binary: (a) 12 (b) 123 (c) 63 (d) 128 (e) 1000
Short Answer
Expert verified
(a) 12 in binary is 1100. (b) 123 in binary is 1111011. (c) 63 in binary is 111111. (d) 128 in binary is 10000000. (e) 1000 in binary is 1111101000.
Step by step solution
01
Convert 12 to Binary
Use the division-by-2 method. Divide the number by 2 and keep track of the remainders. For 12, divide by 2 to get 6 with a remainder of 0. Continue to divide 6 by 2 to get 3 with a remainder of 0. Divide 3 by 2 to get 1 with a remainder of 1. Finally, divide 1 by 2 to get 0 with a remainder of 1. Reading the remainders in reverse order gives the binary: 1100.
02
Convert 123 to Binary
Using the same process, divide 123 by 2. Continue this process capturing the remainders until you reach 0. The sequence of divisions and remainders is as follows: 123/2 = 61 r1, 61/2 = 30 r1, 30/2 = 15 r0, 15/2 = 7 r1, 7/2 = 3 r1, 3/2 = 1 r1, 1/2 = 0 r1. Reading the remainders in reverse order gives the binary: 1111011.
03
Convert 63 to Binary
Apply the division-by-2 method to 63. The division process is: 63/2 = 31 r1, 31/2 = 15 r1, 15/2 = 7 r1, 7/2 = 3 r1, 3/2 = 1 r1, 1/2 = 0 r1. Reading the remainders in reverse order gives the binary: 111111.
04
Convert 128 to Binary
Using the division-by-2 method for 128: 128/2 = 64 r0, 64/2 = 32 r0, 32/2 = 16 r0, 16/2 = 8 r0, 8/2 = 4 r0, 4/2 = 2 r0, 2/2 = 1 r0, 1/2 = 0 r1. Reading the remainders in reverse order gives the binary: 10000000.
05
Convert 1000 to Binary
Finally, apply the division by 2 method to 1000: 1000/2 = 500 r0, 500/2 = 250 r0, 250/2 = 125 r0, 125/2 = 62 r1, 62/2 = 31 r0, 31/2 = 15 r1, 15/2 = 7 r1, 7/2 = 3 r1, 3/2 = 1 r1, 1/2 = 0 r1. Reading the remainders in reverse order gives the binary: 1111101000.
Unlock Step-by-Step Solutions & Ace Your Exams!
-
Full Textbook Solutions
Get detailed explanations and key concepts
-
Unlimited Al creation
Al flashcards, explanations, exams and more...
-
Ads-free access
To over 500 millions flashcards
-
Money-back guarantee
We refund you if you fail your exam.
Over 30 million students worldwide already upgrade their learning with Vaia!
Key Concepts
These are the key concepts you need to understand to accurately answer the question.
Number Systems
Understanding different number systems is foundational in computing and digital electronics. A number system is a writing system for expressing numbers; it's the mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner.
The most familiar number system is the decimal system, also known as base 10, which we use in everyday life. It consists of ten digits from 0 to 9. Every digit in a decimal number has a position, and the decimal point helps us to denote fractional parts. However, machines like computers understand instructions in a different number system, called the binary system.
The binary system is known as base 2, comprising only two digits – 0 and 1. Each digit in a binary number is a bit, representing an on (1) or off (0) state in electrical circuits within computers. To communicate properly with computers and understand their architecture, converting numbers between decimal and binary systems is essential.
The most familiar number system is the decimal system, also known as base 10, which we use in everyday life. It consists of ten digits from 0 to 9. Every digit in a decimal number has a position, and the decimal point helps us to denote fractional parts. However, machines like computers understand instructions in a different number system, called the binary system.
The binary system is known as base 2, comprising only two digits – 0 and 1. Each digit in a binary number is a bit, representing an on (1) or off (0) state in electrical circuits within computers. To communicate properly with computers and understand their architecture, converting numbers between decimal and binary systems is essential.
Binary Arithmetic
At the core of computer operations, binary arithmetic plays a significant role. This form of arithmetic uses the binary number system and is based on two symbols or digits – 0 (zero) and 1 (one). Here's how binary arithmetic is similar to and different from the arithmetic in the decimal system.
Like the decimal system, the binary system has place values. Each place value in a binary number represents a power of 2, starting from 0 on the right, just as each place in a decimal number represents a power of 10. The main operations – addition, subtraction, multiplication, and division – are performed almost the same way as in the decimal system, but with base 2.
In binary addition, for example, we follow a simple set of rules: 0 + 0 equals 0, 1 + 0 (or 0 + 1) equals 1, and 1 + 1 equals 10, where the '1' is carried over to the next higher bit, akin to carrying over in decimal addition. These principles of binary arithmetic are critical for various computing tasks, such as algorithm design and hardware circuitry.
Like the decimal system, the binary system has place values. Each place value in a binary number represents a power of 2, starting from 0 on the right, just as each place in a decimal number represents a power of 10. The main operations – addition, subtraction, multiplication, and division – are performed almost the same way as in the decimal system, but with base 2.
In binary addition, for example, we follow a simple set of rules: 0 + 0 equals 0, 1 + 0 (or 0 + 1) equals 1, and 1 + 1 equals 10, where the '1' is carried over to the next higher bit, akin to carrying over in decimal addition. These principles of binary arithmetic are critical for various computing tasks, such as algorithm design and hardware circuitry.
Division-by-2 Method
The division-by-2 method is a straightforward technique to convert a decimal number into its binary equivalent.
To convert a decimal number to binary, the division-by-2 method involves dividing the number by 2 repeatedly until the quotient is 0, while keeping track of the remainders. The binary result is the sequence of the remainders read in reverse order, from the last remainder obtained to the first.
Here's a step-by-step illustration:
To convert a decimal number to binary, the division-by-2 method involves dividing the number by 2 repeatedly until the quotient is 0, while keeping track of the remainders. The binary result is the sequence of the remainders read in reverse order, from the last remainder obtained to the first.
Here's a step-by-step illustration:
- Divide the decimal number by 2.
- Write down the remainder.
- Use the quotient obtained as the new number to divide by 2.
- Repeat the steps until the quotient is 0.
- Concatenate all the remainders (in reverse) to get the binary number.