Search This Blog

Saturday, November 06, 2010

Binary Data Representation

A binary number may also have a binary point, in addition to the sign. The binary point is used for representing fractions, integers and integer-fraction numbers. Registers are high-speed storage areas within the Central Processing Unit (CPU) of the computer. All data is brought into a register before it can be processed. For example, if two numbers are to be added, both the numbers are brought in registers, added, and the result is also placed in a register. There are two ways of representing the position of the binary point in the register - fixed point number representation and floating point number representation.

The fixed point number representation assumes that the binary point is fixed at one position. The binary point is not actually present in the register, but its presence is assumed based on whether the number which is stored is a fraction or an integer.

The floating point number representation uses two registers. The first register stores the number without the binary point. The second register stores a number that indicates the position of the binary point in the first register.

We shall now discuss representation of data in the fixed point number representation and floating point number representation.

4.1. Fixed Point Number Representation


The integer binary signed number is represented as follows –
  • For a positive integer binary number, the sign bit is 0 and the magnitude is a positive binary number.
  • For a negative integer binary number, the sign bit is 1. The magnitude is represented in any one of the three ways-
    • Signed Magnitude representation - The magnitude is the positive binary number itself.
    • Signed 1’s complement representation - The magnitude is the 1’s complement of the positive binary number.
    • Signed 2’s complement representation - The magnitude is the 2’s complement of the positive binary number.
 the representation of the signed number 18.




Signed magnitude and signed 1’s complement representation are seldom used in computer arithmetic. Let’s now perform arithmetic operations on the signed binary numbers. We use the signed 2’s complement representation to represent the negative numbers.

  • Addition of signed binary numbers – The addition of any two signed binary numbers is performed as follows -




    • Represent the positive number in binary form.(For e.g., +5 is 0000 0101 and +10 is 0000 1010)
    • Represent the negative number in 2’s complement form. (For e.g., -5 is 1111 1011 and -10 is 1111 0110)
    • Add the bits of the two signed binary numbers.
    • Ignore any carry out from the sign bit position.
    • Please note that the negative output is automatically in the 2’s complement form. We get the decimal equivalent of the negative output number, by finding its 2’s complement, and attaching a negative sign to the obtained result. Let’s understand the addition of two signed binary numbers with the help of some examples. Example 1. Add +5 and +10. We represent +5 in binary form, i.e., 0000 0101. We represent +10 in binary form, i.e., 0000 1010. Add the two numbers. The result is 0000 1111 i.e. +15.
      Example 2. Add -5 and +10. We represent -5 in 2’s complement form, i.e., 1111 1011. We represent +10 in binary form, i.e., 0000 1010. Add the two numbers. The result is 0000 0101 i.e. +5.
      Example 3. Add +5 and -10. We represent +5 in binary form, i.e., 0000 0101. We represent -10 in 2’s complement form, i.e., 1111 0110. Add the two numbers. The result is 1111 1011. The result is in 2’s complement form.
      To find the decimal equivalent of the result 1111 1011 – Find the 2’s complement of 1111 1011, i.e., 0000 0100 + 1 = 0000 0101. This is binary equivalent of +5. Attaching a negative sign to the obtained result gives us -5.
      Example 4. Add -5 and -10.
      We represent -5 in 2’s complement form, i.e., 1111 1011. We represent -10 in 2’s complement form, i.e., 1111 0110. Add the two numbers. The result is 1111 0001. The result is in 2’s complement form.
      To find the decimal equivalent of the result 1111 0001- Find the 2’s complement of 1111 0001, i.e., 0000 1110 + 1 = 0000 1111. This is binary equivalent of +15. Attaching a negative sign to the obtained result gives us -15.



  • Subtraction of signed binary numbers – The subtraction of signed binary numbers is changed to the addition of two signed numbers. For this, the sign of the second number is changed before performing the addition operation.




  • (-A) – (+B) = (-A) + (-B) (+B in subtraction is changed to –B in addition)
    (+A) – (+B) = (+A) + (-B) (+B in subtraction is changed to –B in addition)
    (-A) – (-B) = (-A) + (+B) (-B in subtraction is changed to +B in addition)
    (+A) – (-B) = (+A) + (+B) (-B in subtraction is changed to +B in addition)
    We see that the subtraction of signed binary numbers is performed using the addition operation.

    Signed and Unsigned Numbers

    A binary number may be positive or negative. Generally, we use the symbol “+” and “-” to represent positive and negative numbers, respectively. The sign of a binary number has to be represented using 0 and 1, in the computer. An n-bit signed binary number consists of two parts – sign bit and magnitude. The left most bit, also called the Most Significant Bit (MSB) is the sign bit. The remaining n-1 bits denote the magnitude of the number.

    In signed binary numbers, the sign bit is 0 for a positive number and 1 for a negative number. For example, 01100011 is a positive number since its sign bit is 0, and, 11001011 is a negative number since its sign bit is 1. An 8-bit signed number can represent data in the range -128 to +127 (-27 to +27-1). The leftmost bit is the sign bit.

    In an n-bit unsigned binary number, the magnitude of the number n is stored in n bits. An 8-bit unsigned number can represent data in the range 0 to 255 (28= 256).

    Complement of Binary Numbers


    BINARY SYSTEM & ARITHMATIC

    The binary number system  is used in the computer systems. The digits 0 and 1 are combined to get different binary numbers like 1001, 11000110 etc. In a binary number, a digit 0 or 1 is called a bit. For example, 1001 is a 4-bit binary number, and, 11000110 is an 8-bit binary number. All kinds of data, be it alphabets, numbers, symbols, sound data or video data, are represented as combination of bits i.e. 0’s and 1’s. Each character is a unique combination of bits. We shall now discuss how to perform basic arithmetic operations in the binary number system. 
     

    2.1. Binary Addition

    Table 1. Binary Addition Rules for two inputs

    Table 2. Binary Addition Rules for three inputs

    1. Start addition by adding the bits in unit column (the rightmost column). Use the rules of binary addition.
    2. The result of adding bits of a column is a sum with or without a carry.
    3. Write the sum in the result of that column.
    4. If carry is present, the carry is carried-over to the addition of the next left column.
    5. Repeat steps 2-4 for each column, i.e., the tens column, hundreds column and so on.





    Thursday, November 04, 2010

    TOLLFREE Nos 4 PC Problems

    TOLL FREE Nos for any  PC Problems


    AMD   18004256664

    DELL  1800444026

    HCL  18001808080

    IBM  1800443333


    Microsoft  1800111100

    Monday, November 01, 2010

    How to use Remote Desktop Connection (RDC)

    If your home computer has Windows XP Pro (or Media Center Edition) installed, you can access it from any other computer running Windows from anywhere in the world using Remote Desktop Connection. Some versions of Windows, like 98, Me, 2000 and require software available from Microsoft.com:
    http://www.microsoft.com/windowsxp/downloads/tools/rdclientdl.mspx
    There are a few steps required to configure your home network to accept connections from outside computers and additional security measures required to keep your PC safe from people who might be scanning for computers with RDC installed.

    Set A Complex Password

    Remote Desktop relies on Windows XP passwords for login. If you don't currently have a password configured for your account, or if your password is something simple, change it. At minimum, your password should be 10-12 characters long, with a combination of numbers, letters and special characters. This password is no longer just designed to keep out your roommate or family members, it's going to keep the entire Internet from accessing your computer.
    Change the password for your Windows user account from the Users section of the Control Panel.

    Enable Remote Desktop Connections

    The first thing to do is enable Remote Desktop on the machine you want to connect to. Open System Properties either by right clicking the My Computer icon in the Start menu and choosing properties or Windows Key + Pause/Break on your keyboard. Click the Remote tab in System Properties and check the box next to Allow users to connect remotely to this computer.

    You can verify RDC is working by connecting from any other computer on your local network.

    Configure Your Router

    If your router still has the factory default password, change it. While it's unlikely anyone will find your router on the Internet, not changing the password is asking to have it hacked. A strong password of 10-16 characters is advised.
    The next step in the procedure is to configure your router to allow inbound connections to Remote Desktop on your local computer. This requires mapping a port on your router to a port on your local computer. The process for forwarding a port varies depending on who made your router, but in general there are a similar series of steps. Linksys refers to the port forwarding page as Applications & Gaming, most other routers refer to port forwarding options as Virtual Servers. To forward a router port your need to configure the following details:
    Application or Description field: RDC
    Port Range Start: 3389
    Port Range End: 3389
    Protocol Type: Both (or TCP if a both option isn't available)
    IP Address of your PC: Type ipconfig at the command line if you don't know this
    Enable: check a box to enable the port forward
    Router configuration screen
    For security reasons, if you don't travel often, disable this router port when you return from your trip.

    Change the Remote Desktop Listening Port

    For added security of your RDC setup, you can change the default port Remote Desktop Connection listens on from the host computer. This prevents detection by anyone doing a routine scan for RDC. This is also convenient if you want to connect to more than one RDC computer remotely. For instance, I have 3 computers that never leave home. By default, RDC watches the same port on all computers, which means I'll either get a conflict of some kind or I won't be able to connect at all. An alternative is to redirect RDC traffic to each computer.
    You can read more about the process in Microsoft Knowledge Base article 306759
    To change the listening port, you need to modify the Windows Registry. Locate the appropriate Registry key using Regedit.exe:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
    From the Edit menu, click Modify and then click Decimal. Choose a new port number. In general, choosing a number between 49152 and 65535 will avoid conflict with any other apps on your system, but you could theoretically use any port on the system. Once you set the port number you also need to configure your router to pass the specified port to your computer.
    To access your computer remotely, instead of typing just the IP address, you need to type the IP address followed by the port number like this: 192.168.1.1:50001

    Test Your Connection

    The real trick is you need to leave home to test your configuration, so you don't really know it works until you are in the field. You need to know the IP address provided by your ISP to make the connection (Find your IP address). Visit a local coffee shop with WiFi to test the connection. Launch the Remote Desktop Connection client from Start > All Programs > Accessories > Communications.
    RDC Launch screen
    Enter your home IP address and cross your fingers. If all went well, you'll see the Windows Login screen