0% found this document useful (0 votes)
9 views8 pages

SmartGadgets Numbersystem

The document provides a workshop on smart gadgets focusing on number systems including decimal, binary, and hexadecimal conversions. It includes methods for converting between these systems, examples of binary to hex conversions, and practical exercises involving bitwise operators. The content is structured to facilitate understanding of binary operations and conversions for various numerical representations.

Uploaded by

Rahul Ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views8 pages

SmartGadgets Numbersystem

The document provides a workshop on smart gadgets focusing on number systems including decimal, binary, and hexadecimal conversions. It includes methods for converting between these systems, examples of binary to hex conversions, and practical exercises involving bitwise operators. The content is structured to facilitate understanding of binary operations and conversions for various numerical representations.

Uploaded by

Rahul Ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Smart Gadgets Workshop

Hex Binary Decimal


and
Bitwise operators
Decimal to Binary

0 – 0000
1 - 0001
2 - 0010
3 - 0011

4 – 0100
5 - 0101
6 - 0110
7 - 0111
8 - 1000
Decimal Hex Binary
1 1 0001
2 2 0010
4 4 0100
8 8 1000
Binary to Hex
• Break the hex in groups of 4 starting with right
• 1001 1110 to be converted to Hex
• 1110 = 8+4+2 =14 = E
• 1001 = 8+1 = 9
• So, Hex = 0xE9
Hex to binary
• 0x73 to be converted to binary
• Break each letter separately
• 7 = 0111
• 3 = 0011
• 0x73 = 0111 0011 (in binary)
Decimal to Binary and Hex
• 73 in Decimal to Binary and Hex

1 2 4 8 16 32 64 73 128

So, (73) = 64 + (9) = 64 + 8 + 1

Starting with right, we write in binary, 1001001

For hex, break the binary in 2 groups of 4 starting with right, ie


(73) = 100 1001 = 0100 1001 = 0x49
Binary Operators
• &
1011 0110
& 1010 0101
1010 0100
• |
1011 0110
| 1010 0101
1011 0111
Practice Exercise
• 0x 76 in binary = ?
• 76 in Hex = ? And binary = ?
• 0x54 in decimal = ?
• 0x77 & 0x30 = ?
• 0x67 & 0x48 = ?
• 0x77 | 0x30 = ?
• 0x67 | 0x48 = ?

You might also like