BIT103Semester I10 units85 solved questions1,023 study cardsFull study modes
The free sample is open to everyone. Sign in for 2 free weeks of every answer, flashcards and progress.
Digital computers store and process everything as binary numbers. This chapter shows how to convert between number systems and how to do arithmetic, including subtraction with complements, which is how real hardware subtracts.
A number system has a base (radix), which is the count of digits it uses. Decimal has base 10, binary base 2, octal base 8 and hexadecimal base 16. Hexadecimal digits are 0 to 9 and A to F. Here A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
Decimal to any base: divide the number again and again by the base. Write down each remainder. Read the remainders from bottom to top.
$$\begin{aligned} 45 \div 2 &= 22 \text{ rem } 1 \ 22 \div 2 &= 11 \text{ rem } 0 \ 11 \div 2 &= 5 \text{ rem } 1 \ 5 \div 2 &= 2 \text{ rem } 1 \ 2 \div 2 &= 1 \text{ rem } 0 \ 1 \div 2 &= 0 \text{ rem } 1 \end{aligned}$$
Reading upward gives $(45)_{10} = (101101)_2$.
Any base to decimal: multiply each digit by its place value (a power of the base) and add.
$$(3A7)_{16} = 3 \times 256 + 10 \times 16 + 7 = 768 + 160 + 7 = 935$$
Binary to octal: group bits in threes from the right. Binary to hexadecimal: group bits in fours from the right. Add zeros on the left if a group is short.
$$(101101)_2 = (101\ 101)_2 = (55)_8, \qquad (101101)_2 = (0010\ 1101)2 = (2D){16}$$
Octal or hexadecimal to binary is the reverse. Replace each digit by its 3-bit or 4-bit group.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 214 | 11010110 | 326 | D6 |
To go from octal to hexadecimal, convert to binary first and regroup. For example $(326)_8 = (011\ 010\ 110)_2 = (1101\ 0110)2 = (D6){16}$.
Digital Logic for TU BIT is covered here in full, from syllabus notes to solved past questions. This subject has 10 chapters mapped to the official syllabus, and 85 past exam questions with written model answers. The opening of every note and answer is free, and the most-searched questions are free in full. A free account gets 2 free weeks of the whole program plus flashcards and progress tracking so weak topics come back before the exam.
This TU BIT Digital Logic guide covers Number Systems and Conversions, Boolean Algebra and Logic Gates, Combinational Logic Simplification, Combinational Logic Circuits, Decoders and Encoders, Multiplexers and Demultiplexers, Programmable Logic Devices, Flip-Flops and Latches, and more, across 10 chapters. It includes model answers to 85 past exam questions, plus flashcards for quick revision.
Digital Logic has 10 chapters mapped to the official syllabus.
Yes. Each of the 85 past questions comes with a written model answer; the most-searched ones are free in full, the rest open with a free account's 2 free weeks or a pass.
Free to start. The opening of every note and answer is free, the most-searched questions are free in full, and a free account gets 2 free weeks of the whole program plus flashcards and progress tracking. After that a program pass keeps everything open.
Based on the official syllabus.
Digital computers store and process everything as binary numbers. This chapter shows how to convert between number systems and how to do arithmetic, including subtraction with complements, which is how real hardware subtracts.
A number system has a base (radix), which is the count of digits it uses. Decimal has base 10, binary base 2, octal base 8 and hexadecimal base 16. Hexadecimal digits are 0 to 9 and A to F. Here A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
Decimal to any base: divide the number again and again by the base. Write down each remainder. Read the remainders from bottom to top.
45 \div 2 &= 22 \text{ rem } 1 \\ 22 \div 2 &= 11 \text{ rem } 0 \\ 11 \div 2 &= 5 \text{ rem } 1 \\ 5 \div 2 &= 2 \text{ rem } 1 \\ 2 \div 2 &= 1 \text{ rem } 0 \\ 1 \div 2 &= 0 \text{ rem } 1 \end{aligned}$$ Reading upward gives $(45)_{10} = (101101)_2$. **Any base to decimal:** multiply each digit by its place value (a power of the base) and add. $$(3A7)_{16} = 3 \times 256 + 10 \times 16 + 7 = 768 + 160 + 7 = 935$$ **Binary to octal:** group bits in threes from the right. **Binary to hexadecimal:** group bits in fours from the right. Add zeros on the left if a group is short. $$(101101)_2 = (101\ 101)_2 = (55)_8, \qquad (101101)_2 = (0010\ 1101)_2 = (2D)_{16}$$ Octal or hexadecimal to binary is the reverse. Replace each digit by its 3-bit or 4-bit group. | Decimal | Binary | Octal | Hex | |---|---|---|---| | 8 | 1000 | 10 | 8 | | 10 | 1010 | 12 | A | | 15 | 1111 | 17 | F | | 214 | 11010110 | 326 | D6 | To go from octal to hexadecimal, convert to binary first and regroup. For example $(326)_8 = (011\ 010\ 110)_2 = (1101\ 0110)_2 = (D6)_{16}$.