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.

problem in signed and unsigned variable(help me)

Status
Not open for further replies.

amir1985

Newbie level 3
Joined
Mar 6, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
I know this, my question is that assumes conditons that we use this data for other blocks,how you can find out that this value is two complementary or not?
 

Dear Amir,

If you have defined the signed reg or wire and , you do not have to worry about then, If it is negative value, It is 2's compliment, e.g. 111010 for -5 and 000101 for +5
even if you are using it in any way.
Try making a simple project of adder etc. with signed regs and wires and test it.
 

I think he is not asking wrt code. Instead he is asking how in run time, a data can be detected for 2's complement.....

I dont think it is that easy to detect....and why would you want to do so?..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top