Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] -.5 representation in binary

Status
Not open for further replies.

dipin

Full Member level 4
Joined
Jul 16, 2014
Messages
223
Helped
14
Reputation
28
Reaction score
14
Trophy points
18
Activity points
1,731
hi ..

in division that includes fraction , i am using fixed point the division includes negative numbers too..but i have a problem . For negative numbers i am using 2's complement methode and i dont know how to represent (-.5) using 2's complement.
is it possible to represent numbres like -.25 ,-.125 in 2's complement form. In signed magnitude form it can implement, because there is -ve and +ve zeros . what about 2's complement form .if any body know this plz help

thanks & regards
 

To change sign, invert all bits and add '1' to the LSB.

0.5 = 0000.1000
-0.5 = 1111.0111 + 0000.0001 = 1111.1000
 
  • Like
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top