Binary arithmetic, shifts and hexadecimal
खेलकर सीखें
इन सवालों के जवाब देकर एनर्जी कमाएं, फिर मछली पकड़ें और घूमें। कोई अकाउंट नहीं चाहिए।
शिक्षकों के लिए: Binary arithmetic, shifts and hexadecimal (Computer Science, Data Representation) के लिए इस्तेमाल के लिए तैयार लेसन स्लाइड्स, रिवीज़न नोट्स — इन्हें अपने लेसन में इस्तेमाल करें, या टॉपिक को एक इंटरैक्टिव क्लास एक्टिविटी की तरह चलाएं जिसे आपके शिक्षार्थी लाइव गेम की तरह खेलें।
लेसन नोट्स
Binary addition
- Rules: 0+0 = 0; 0+1 = 1; 1+1 = 10 (write 0, carry 1); 1+1+1 = 11 (write 1, carry 1).
- Example: 0101 + 0011 = 1000 (5 + 3 = 8).
- Overflow: if the result needs more bits than are available (e.g. an 8-bit register gets a 9th bit), the extra bit is lost, giving a wrong answer.
Adding unsigned values
Binary shifts
- A left shift moves bits left, filling with 0s: it multiplies an unsigned value by 2 for each place, provided no significant bit is lost. 00001100 (12) shifted left 2 = 00110000 (48).
- A right shift moves bits right, filling with 0s: it divides by 2 (rounding down) for each place. 00001100 shifted right 1 = 00000110 (6).
- Bits shifted off the end are lost.
Unsigned eight-bit shifts
Hexadecimal
- Hexadecimal (base 16) uses digits 0-9 and A-F (A=10 ... F=15).
- Binary to hex: split into 4-bit groups (nibbles). 1010 1111 → A F → AF. Hex to binary: convert each digit: 3C → 0011 1100.
- Hex to denary: 3C = 3×16 + 12 = 60. Denary to hex: 255 = FF.
Four bits per hex digit
Why hex?
- Hex is shorter and easier for humans to read and write than long binary: colour codes (#FF0000), memory addresses, MAC addresses and error codes.
स्लाइड्स
Sign up free to view the lesson slides
Step through every slide for this topic — plus flashcards and revision notes — with a free account.
प्रैक्टिस सवाल
फ्री प्रीव्यू — 33 में से 8 सवाल। सभी देखने के लिए साइन अप करें।
1.What base does hexadecimal use?
Easy- A16
- B10
- C2
- D8
2.What is binary 1 + 1?
Easy- A10
- B2
- C11
- D0
3.What does overflow mean?
Easy- Athe result is too big for the bits available
- Bthe result is zero
- Cthe result is negative
- Dthe loop ends
4.What is F in denary?
Easy- A15
- B16
- C14
- D10
5.For an unsigned binary value, with no significant bit lost, what is the effect of a one-place left shift?
Easy- Adoubles the value
- Bhalves the value
- Cadds 1
- Dsubtracts 1
6.What is 00000110 shifted left 1?
Easy- A00001100
- B00000011
- C00001010
- D00001000
7.What is 00001000 shifted right 2?
Easy- A00000010
- B00100000
- C00000100
- D00000001
8.What is 0011 + 0110 in binary?
Easy- A1001
- B1010
- C0111
- D1000
Unlock all 33 questions & more
इस टॉपिक के हर सवाल, स्लाइड्स, फ्लैशकार्ड और रिवीज़न नोट्स देखने के लिए फ्री अकाउंट बनाएं।
पास्ट पेपर
इस टॉपिक के लिए पास्ट-पेपर प्रैक्टिस जल्द आ रही है।
जल्द आ रहा है
