What is the largest hex value that can be moved into an 8 bit register?
Answers
Answered by
0
Write a C program to input binary number from user and find twos complement of the binary number. How to find 2s complement of a binary number in C. Logic to find twos complement of a binary number in C programming.
Example
Input
Input binary number: 01101110
Output
Twos complement: 10010010
Example
Input
Input binary number: 01101110
Output
Twos complement: 10010010
Answered by
0
Answer:
0xFF
Explanation:
Location 0 (first from the right: LSB): 1∗20=1 .
Location 1: 1∗21=2.
Location 2: 1∗22=4.
Location 3: 1∗23=8.
Location 4: 1∗24=16.
Location 5: 1∗25=32.
Location 6: 1∗26=64.
Location 7: 1∗27=128.
Now, sum(1,2,4,8,16,32,64,128)=255 .
255 to binary gives 0b11111111 which can then be converted to hex and give 0xFF
Similar questions