Computing in Security (Conversion Help)

1.) Express each decimal number as an 8-bit binary number in the 2's complement form and then find the negative of the representation of that number in two’s compliment

a.) +18

b) -117

Thanks for any help!

  1. 👍 0
  2. 👎 0
  3. 👁 332
  1. Two's complement is a notation that represents both positive and negative numbers. The most significant (left-most) is the sign bit, which is turned on when the number is negative.

    Unlike the one's complement, there is only one representation of zero.

    For an eight-bit number, the range goes from -128 to 127.

    A positive number is represented by a usual binary number format, using the 7 low-order (right-most) bits, and represent from 0 to 127.

    A negative number is simply the reversal of the bits and then add 1.

    Example:
    10(decimal)=00001010(binary)
    -10(decimal)=11110101 + 1
    =11110110

    18(decimal)=00010010(binary)
    -18(decimal)=11101101 + 1
    =11101110

    and so on.

    To negate a negative number, subtract one and reverse the bits.

    For example,
    -18(decimal)=11101110
    subtract 1
    11101101
    Reverse bits
    00010010 (binary -18)

    1. 👍 0
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. Probability please help!

    The digits 2, 3, 4, 7, and 8 are each used once in a random order to form a five-digit number. What is the probability that the resulting number is divisible by 4? Express your answer as a common fraction.

    asked by SuckatProb on November 20, 2012
  2. math

    Caitlyn calculated the probability of the complement of rolling a number greater than 2 on a 6-side number cube. She made her calculation as follows. Did she make an error? Explain.

    asked by liyah on February 11, 2016
  3. Statistics

    A coin is tossed 7 times. What is the probability that the number of heads obtained will be between 2 and 4 inclusive? Express your answer as a fraction or a decimal number rounded to four decimal places.

    asked by Sadie on February 22, 2017
  4. Urgent math

    population growth model. Can anybody please help me out in trying to solve this problem? It's my homework and I don't seem to understand what I am getting. The count in a culture of bacteria was 400 after 2 hours and 25,600 after

    asked by Lydia on August 3, 2015
  5. math

    A fair, six-sided die is rolled eight times, to form an eight-digit number. What is the probability that the resulting number is a multiple of 8? Express your answer as a common fraction.

    asked by Anonymous on July 27, 2012
  1. Probability

    A binary communication system is used to send one of two messages: (i) message A is sent with probability 2/3, and consists of an infinite sequence of zeroes, (ii) message B is sent with probability 1/3, and consists of an

    asked by John on March 6, 2015
  2. math statistics

    For each probability and percentile problem, draw the picture. A random number generator picks a number from 1 to 9 in a uniform manner. 1) Give the distribution of X. X = 2) Enter an exact number as an integer, fraction, or

    asked by lora on July 15, 2012
  3. math

    significant numbers 2.8723 * 1.6 = 4.59568. Is it 4.6 because it is the smallest number you are multiplying it by in the sum? e.g. 2.8723 has 5 signifigant figures but 1.6 has 2 so the answer has no more than 2.Smallest number of

    asked by jo on November 11, 2009
  4. math

    can someone review my answers 1. Express 5/8 as a decimal Answer: 0.875 2. express 1 1/20 as a decimal Answer: 1.2 3. express 2.6 as a mixed number Answer: 2 6/10

    asked by help on October 27, 2017
  5. computer science

    What is the binary representation of the following hexadecimal number? What are the decimal numbers they represent when interpreted as undesigned integers. (a) F4 (b) 9F

    asked by Drake on October 17, 2010

You can view more similar questions or ask a new question.