. What is the sign-and-magnitude of the following 4's complement number? (Leave answer in base 4).

What is the sign-and-magnitude of the following 4's complement number? (Leave answer in base 4).

The number: 33333210 (base 4)

Hi, Ive been asked the following question and although slightly familary with compure match and storage, i can't figure this. I gather it needs converting

Thanks a lot in advance

Paul

Reply to
paulcullen
Loading thread data ...

May I suggest looking at Isreal Koren's "Computer Arithmetic Algorithms". He has a pretty good treatment of number systems in there.

Reply to
Ray Andraka

Well, sometimes we help with homework, sometimes we don't - I'll give a little help.

As it's better if you do the conversion yourself, consider that a base

4 number is in fact two bits in base 2 (if you want to use a calculator). The sign of the number is obvious from inspection.

If it's positive, then the answer is the value stated.

if it's negative, then simply subtract the above number from 400000000 (base 4) or alternatively, subtract the number from 33333333 and add 1.

If you have some reason other than homework to ask, do tell :)

Cheers

PeteS

Reply to
PeteS

Be aware that the answer depends on the word size - if it's a 16 bit number I'd give one answer; if it's larger (say 32 bit) I'd give another answer.

- Brian

Reply to
Brian Drummond

(snip)

You mean 8 quits, not 16 bits.

bits, trits, quits, quints, ...

-- glen

Reply to
glen herrmannsfeldt

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.