Binary Representation

A computer understands only digital data. Computer systems are constructed of digital electronics. That means that their electronic circuits can exist in only one of two states: on or off. Because of their digital nature, a computer's electronics can easily manipulate numbers stored in binary by treating 1 as "on" and 0 as "off." Binary digit or bit is the smallest unit of information on a computer. One bit contains a single binary value — either a 0 or a 1. A byte contains eight bits, which means it can have 256 (28) different values. An integer that can never be negative is called an unsigned integer. It can take only positive values or a zero.
Sign-magnitude is a method of representing negative numbers. Sign-magnitude representation uses the most significant bit of the number to indicate the sign. Ones' complement can be used to represent negative numbers. The ones' complement form of a negative binary number is the complement of its positive counterpart. The most common format used to represent signed integers in modern computers is two's complement. Negative numbers are represented using a 2's complement form. The 2’s complement of a binary value is obtained by (1) converting the value to its 1’s complement, then (2) adding 1 to that complement.

To Access the full content, Please Purchase

  • Q1

    Define real numbers.

    Marks:1
    Answer:

    A number containing both integer and fractional parts is called a real number.

    View Answer
  • Q2

    What is the function of two’s complement?

    Marks:1
    Answer:

    It is a method used to represent negative numbers in binary. It is calculated by adding 1 to its 1’s complement.

    View Answer
  • Q3

    What is the function of one’s complement.

    Marks:1
    Answer:

    It can be used to represent positive numbers by their binary equivalents and negative numbers by their 1’s complement.

    View Answer
  • Q4

    Name the three ways in which integers can be represented.

    Marks:1
    Answer:

    Integers can be represented in three ways:
    · Signed and magnitude representation
    · One’s complement
    · Two’s complement

    View Answer
  • Q5

    Define unsigned integer.

    Marks:1
    Answer:

    An integer that can never be negative and takes only positive values is called an unsigned integer.

    View Answer