Forum Discussion
Altera_Forum
Honored Contributor
14 years agoRadix problem
hello. I am beginner... and i have a problem. i attached the picture of my simulation file. i am confused because when i change the radix binary to decimal... it doesn't show me the rig...
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- thanks, but what does the 'unsigned' do..? when i click the 'unsigned' , the nuber looks right. but i don't know what the 'unsigned clicking' makes unsigned. what is that? --- Quote End --- The 4-bit signal you are looking at can be interpreted as a signed value or unsigned value. When its interpreted as a signed value, the MSB represents -2^(B-1), where B is the number of bits. For example, with B = 3-bits you get the two possible interpretations (for the same bit representation);
Unsigned
---------
111 = 7
110 = 6
101 = 5
100 = 4
011 = 3
010 = 2
001 = 1
000 = 0
Signed
---------
011 = 3
010 = 2
001 = 1
000 = 0
111 = -1 (= -4 + 3)
110 = -2 (= -4 + 2)
101 = -3 (= -4 + 1)
100 = -4
Note how the MSB represents -2^(B-1) = -4 in the signed version. You can also interpret the 4-bit values as fractional integers, where you add a decimal point. Read this wikipedia entry: http://en.wikipedia.org/wiki/q_%28number_format%29 and this document: http://www.ovro.caltech.edu/~dwh/correlator/pdf/esc-100paper_hawkins.pdf (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/esc-100paper_hawkins.pdf) Cheers, Dave