what is the ones complement representation of 0 ?
jeevsmyd
-2
Junior Poster
Recommended Answers
Jump to Postwhat is the ones complement representation of 0 ?
Short answer (0D encoded in 1 byte): 00000000 and 11111111. There are really two one's complement representations of decimal 0 (=0D).
Longer answer, well, not sure whether this answer is too long:
There are four commonly used …
Jump to Post"weired" should be weird, weird number?
Jump to PostI have to correct a mistake: I wrote that the one's complement would be still commonly used. This is not correct. Today, this complement is never been used. The prime reason is, that it allows two differently encoded zeros (0000, 1111).
To implement the zero test (if (a==0)...) both …
Jump to PostAnd one not about long ago adding error checking to binary GCD algorithm in ARM assembler: one interesting feature of 2's complement is that there is that smallest negative number, whose ABSolute value is not in the INTegers. So it is actually possible to have overflow error of taking ABS …
Jump to Postone more doubt , 1s complement of zero can either be 1,1111 or 0,1111, right? when you take the complement of a number, you gotta take the complement of the sign bit also, right?
No. 1s complement of zero is either 1,1111 or 0,0000.
All 17 Replies
kings_mitra
-1
Junior Poster
jeevsmyd
-2
Junior Poster
kings_mitra
-1
Junior Poster
jeevsmyd
-2
Junior Poster
jeevsmyd
-2
Junior Poster
jeevsmyd
-2
Junior Poster
kings_mitra
-1
Junior Poster
kings_mitra
-1
Junior Poster
jeevsmyd
-2
Junior Poster
kings_mitra
-1
Junior Poster
tesuji
135
Master Poster
tesuji
135
Master Poster
tesuji
135
Master Poster
kings_mitra
-1
Junior Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
arkoenig
340
Practically a Master Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.