On Nov 26, 4:39 pm, Andrew Haley <andre...@littlepinkcloud.invalid>
wrote:
> carmen cojocaru <
carmenn.cojoc...@yahoo.com> wrote:
> > Hi,
> > I am trying to generate a sequence of random numbers and I need them
> > to have the same length(100 bits, not 99, not 98).
> > But my code doesn't do what I was expecting to do. Can someone tell me
> > where's the problem?
>
> I don't think there is one. All of the numbers are 100 bits long, but
> the output conversion routine doesn't print the leftmost zeroes.
>
> Andrew.
My apologies. I forgot about this case. Let me give you a more
appropriate output.
101010011000011001001110010111001010000101111111100011111010001101011111110110000100100111110010100
1110010100111111011101011000111101110000011001101111111011110110110101001000110000111001111011010110
1110000100011011010000001010111011101100000011110000001110111101110010101011111010110001000001100110
1001111001000110010101011010000011110000100100010000011100000111100111011100011001100001011010101
1111010101111100010100001110010010101101010100100110111101111110111100111100001101110000110010100
Taking a good look at the last string, it's obvious that the three
leftmost bits are zeroes, so why printing two zero-bits and not all
five bits since they are all zeroes?
Is this also an output conversion?
I'll be waiting for your reply. Thanks.
Carmen.