PC Review


Reply
Thread Tools Rate Thread

Decimal-Hex-Binary coverter

 
 
Randem
Guest
Posts: n/a
 
      2nd Jun 2009
There is one here http://www.randem.com/freeware.html


--
Randem Systems
Your Installation Specialist
The Top Inno Setup Script Generator
http://www.randem.com/innoscript.html
Disk Read Error Press Ctl+Alt+Del to Restart
http://www.randem.com/discus/message...tml?1236319938



"1Adata" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> is there simple standalone freeware utility to convert decimal-hex-binary
> values?
>
> 0 = 0xFFFF = 1111 1111 1111 1111
> 1 = 0xFFFE = 1111 1111 1111 1110
> 2 = 0xFFFC = 1111 1111 1111 1100
> 3 = 0xFFF8 = 1111 1111 1111 1000
> ...
> can no find one that preserve results exactly in this format.



 
Reply With Quote
 
 
 
 
Jim
Guest
Posts: n/a
 
      2nd Jun 2009

"1Adata" <(E-Mail Removed)> wrote in message
news:O3%(E-Mail Removed)...
>
> "HeyBub" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 1Adata wrote:
>> > is there simple standalone freeware utility to convert
>> > decimal-hex-binary values?
>> >
>> > 0 = 0xFFFF = 1111 1111 1111 1111
>> > 1 = 0xFFFE = 1111 1111 1111 1110
>> > 2 = 0xFFFC = 1111 1111 1111 1100
>> > 3 = 0xFFF8 = 1111 1111 1111 1000
>> > ...
>> > can no find one that preserve results exactly in this format.

>>
>> Of course not. The equations you offer are wrong, i.e.,
>>
>> 0 = 0x0000 = 0000 0000 0000 0000
>>
>> They are not even negatives:
>>
>> -1 = 0xFFFF = 1111 1111 1111 1111
>>

> ----------
>
> sorry I was mistaken, I got confused, it looks the correct is only hex to
> binary conformity, the decimal numbers are wrong.
> Its just communication with microcontroller, there is a sort of counter,
> for
> instance, when a card has three rides left the value is
> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111 1111
> 1100),
> one ride equals 0xFFFE
> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111 1111).
> But
> looks decimal numbers does not conform the hex and binary format.
>

It is the card which is confusing you. It is not reporting its status in
normal format. The only way to get a report in the format that you desire
is to prepare your own program.

In essence, hex FFFF equals -1 decimal.
Hex FFFe = -2 decimal
Hex FFF8 = -32 decimal

This is true for a machine which uses 2's complement arithmetic.

Jim



 
Reply With Quote
 
 
 
 
1Adata
Guest
Posts: n/a
 
      3rd Jun 2009

"Jim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "1Adata" <(E-Mail Removed)> wrote in message
> news:O3%(E-Mail Removed)...
>>
>> "HeyBub" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 1Adata wrote:
>>> > is there simple standalone freeware utility to convert
>>> > decimal-hex-binary values?
>>> >
>>> > 0 = 0xFFFF = 1111 1111 1111 1111
>>> > 1 = 0xFFFE = 1111 1111 1111 1110
>>> > 2 = 0xFFFC = 1111 1111 1111 1100
>>> > 3 = 0xFFF8 = 1111 1111 1111 1000
>>> > ...
>>> > can no find one that preserve results exactly in this format.
>>>
>>> Of course not. The equations you offer are wrong, i.e.,
>>>
>>> 0 = 0x0000 = 0000 0000 0000 0000
>>>
>>> They are not even negatives:
>>>
>>> -1 = 0xFFFF = 1111 1111 1111 1111
>>>

>> ----------
>>
>> sorry I was mistaken, I got confused, it looks the correct is only hex to
>> binary conformity, the decimal numbers are wrong.
>> Its just communication with microcontroller, there is a sort of counter,
>> for
>> instance, when a card has three rides left the value is
>> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111 1111
>> 1100),
>> one ride equals 0xFFFE
>> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111 1111).
>> But
>> looks decimal numbers does not conform the hex and binary format.
>>

> It is the card which is confusing you. It is not reporting its status in
> normal format. The only way to get a report in the format that you desire
> is to prepare your own program.
>
> In essence, hex FFFF equals -1 decimal.
> Hex FFFe = -2 decimal
> Hex FFF8 = -32 decimal
>
> This is true for a machine which uses 2's complement arithmetic.
>
> Jim

-----------

I have no task to get report in my custom format, just trying to understand
how to program card if I need charge card for 10-rides or 20-rides, what
data I should write to card?

 
Reply With Quote
 
Stan Weiss
Guest
Posts: n/a
 
      3rd Jun 2009


1Adata wrote:
>
> "Jim" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > "1Adata" <(E-Mail Removed)> wrote in message
> > news:O3%(E-Mail Removed)...
> >>
> >> "HeyBub" <(E-Mail Removed)> wrote in message
> >> news:%(E-Mail Removed)...
> >>> 1Adata wrote:
> >>> > is there simple standalone freeware utility to convert
> >>> > decimal-hex-binary values?
> >>> >
> >>> > 0 = 0xFFFF = 1111 1111 1111 1111
> >>> > 1 = 0xFFFE = 1111 1111 1111 1110
> >>> > 2 = 0xFFFC = 1111 1111 1111 1100
> >>> > 3 = 0xFFF8 = 1111 1111 1111 1000
> >>> > ...
> >>> > can no find one that preserve results exactly in this format.
> >>>
> >>> Of course not. The equations you offer are wrong, i.e.,
> >>>
> >>> 0 = 0x0000 = 0000 0000 0000 0000
> >>>
> >>> They are not even negatives:
> >>>
> >>> -1 = 0xFFFF = 1111 1111 1111 1111
> >>>
> >> ----------
> >>
> >> sorry I was mistaken, I got confused, it looks the correct is only hex to
> >> binary conformity, the decimal numbers are wrong.
> >> Its just communication with microcontroller, there is a sort of counter,
> >> for
> >> instance, when a card has three rides left the value is
> >> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111 1111
> >> 1100),
> >> one ride equals 0xFFFE
> >> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111 1111).
> >> But
> >> looks decimal numbers does not conform the hex and binary format.
> >>

> > It is the card which is confusing you. It is not reporting its status in
> > normal format. The only way to get a report in the format that you desire
> > is to prepare your own program.
> >
> > In essence, hex FFFF equals -1 decimal.
> > Hex FFFe = -2 decimal
> > Hex FFF8 = -32 decimal
> >
> > This is true for a machine which uses 2's complement arithmetic.
> >
> > Jim

> -----------
>
> I have no task to get report in my custom format, just trying to understand
> how to program card if I need charge card for 10-rides or 20-rides, what
> data I should write to card?


Based on the logic shown by your example
> 0 = 0xFFFF = 1111 1111 1111 1111
> 1 = 0xFFFE = 1111 1111 1111 1110
> 2 = 0xFFFC = 1111 1111 1111 1100
> 3 = 0xFFF8 = 1111 1111 1111 1000


16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go
 
Reply With Quote
 
1Adata
Guest
Posts: n/a
 
      3rd Jun 2009

"Stan Weiss" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> 1Adata wrote:
>>
>> "Jim" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >
>> > "1Adata" <(E-Mail Removed)> wrote in message
>> > news:O3%(E-Mail Removed)...
>> >>
>> >> "HeyBub" <(E-Mail Removed)> wrote in message
>> >> news:%(E-Mail Removed)...
>> >>> 1Adata wrote:
>> >>> > is there simple standalone freeware utility to convert
>> >>> > decimal-hex-binary values?
>> >>> >
>> >>> > 0 = 0xFFFF = 1111 1111 1111 1111
>> >>> > 1 = 0xFFFE = 1111 1111 1111 1110
>> >>> > 2 = 0xFFFC = 1111 1111 1111 1100
>> >>> > 3 = 0xFFF8 = 1111 1111 1111 1000
>> >>> > ...
>> >>> > can no find one that preserve results exactly in this format.
>> >>>
>> >>> Of course not. The equations you offer are wrong, i.e.,
>> >>>
>> >>> 0 = 0x0000 = 0000 0000 0000 0000
>> >>>
>> >>> They are not even negatives:
>> >>>
>> >>> -1 = 0xFFFF = 1111 1111 1111 1111
>> >>>
>> >> ----------
>> >>
>> >> sorry I was mistaken, I got confused, it looks the correct is only hex
>> >> to
>> >> binary conformity, the decimal numbers are wrong.
>> >> Its just communication with microcontroller, there is a sort of
>> >> counter,
>> >> for
>> >> instance, when a card has three rides left the value is
>> >> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111 1111
>> >> 1100),
>> >> one ride equals 0xFFFE
>> >> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111
>> >> 1111).
>> >> But
>> >> looks decimal numbers does not conform the hex and binary format.
>> >>
>> > It is the card which is confusing you. It is not reporting its status
>> > in
>> > normal format. The only way to get a report in the format that you
>> > desire
>> > is to prepare your own program.
>> >
>> > In essence, hex FFFF equals -1 decimal.
>> > Hex FFFe = -2 decimal
>> > Hex FFF8 = -32 decimal
>> >
>> > This is true for a machine which uses 2's complement arithmetic.
>> >
>> > Jim

>> -----------
>>
>> I have no task to get report in my custom format, just trying to
>> understand
>> how to program card if I need charge card for 10-rides or 20-rides, what
>> data I should write to card?

>
> Based on the logic shown by your example
>> 0 = 0xFFFF = 1111 1111 1111 1111
>> 1 = 0xFFFE = 1111 1111 1111 1110
>> 2 = 0xFFFC = 1111 1111 1111 1100
>> 3 = 0xFFF8 = 1111 1111 1111 1000

>
> 16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go


-----------
0,1,2,3 - is not digits, its just rides quantity, it does not conform the
hex and binary format.

 
Reply With Quote
 
Stan Weiss
Guest
Posts: n/a
 
      3rd Jun 2009


1Adata wrote:
>
> "Stan Weiss" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> >
> > 1Adata wrote:
> >>
> >> "Jim" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> >
> >> > "1Adata" <(E-Mail Removed)> wrote in message
> >> > news:O3%(E-Mail Removed)...
> >> >>
> >> >> "HeyBub" <(E-Mail Removed)> wrote in message
> >> >> news:%(E-Mail Removed)...
> >> >>> 1Adata wrote:
> >> >>> > is there simple standalone freeware utility to convert
> >> >>> > decimal-hex-binary values?
> >> >>> >
> >> >>> > 0 = 0xFFFF = 1111 1111 1111 1111
> >> >>> > 1 = 0xFFFE = 1111 1111 1111 1110
> >> >>> > 2 = 0xFFFC = 1111 1111 1111 1100
> >> >>> > 3 = 0xFFF8 = 1111 1111 1111 1000
> >> >>> > ...
> >> >>> > can no find one that preserve results exactly in this format.
> >> >>>
> >> >>> Of course not. The equations you offer are wrong, i.e.,
> >> >>>
> >> >>> 0 = 0x0000 = 0000 0000 0000 0000
> >> >>>
> >> >>> They are not even negatives:
> >> >>>
> >> >>> -1 = 0xFFFF = 1111 1111 1111 1111
> >> >>>
> >> >> ----------
> >> >>
> >> >> sorry I was mistaken, I got confused, it looks the correct is only hex
> >> >> to
> >> >> binary conformity, the decimal numbers are wrong.
> >> >> Its just communication with microcontroller, there is a sort of
> >> >> counter,
> >> >> for
> >> >> instance, when a card has three rides left the value is
> >> >> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111 1111
> >> >> 1100),
> >> >> one ride equals 0xFFFE
> >> >> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111
> >> >> 1111).
> >> >> But
> >> >> looks decimal numbers does not conform the hex and binary format.
> >> >>
> >> > It is the card which is confusing you. It is not reporting its status
> >> > in
> >> > normal format. The only way to get a report in the format that you
> >> > desire
> >> > is to prepare your own program.
> >> >
> >> > In essence, hex FFFF equals -1 decimal.
> >> > Hex FFFe = -2 decimal
> >> > Hex FFF8 = -32 decimal
> >> >
> >> > This is true for a machine which uses 2's complement arithmetic.
> >> >
> >> > Jim
> >> -----------
> >>
> >> I have no task to get report in my custom format, just trying to
> >> understand
> >> how to program card if I need charge card for 10-rides or 20-rides, what
> >> data I should write to card?

> >
> > Based on the logic shown by your example
> >> 0 = 0xFFFF = 1111 1111 1111 1111
> >> 1 = 0xFFFE = 1111 1111 1111 1110
> >> 2 = 0xFFFC = 1111 1111 1111 1100
> >> 3 = 0xFFF8 = 1111 1111 1111 1000

> >
> > 16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go

>
> -----------
> 0,1,2,3 - is not digits, its just rides quantity, it does not conform the
> hex and binary format.


It is also a count of how many bits are set to zero "0"
 
Reply With Quote
 
1Adata
Guest
Posts: n/a
 
      3rd Jun 2009

"Stan Weiss" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> 1Adata wrote:
>>
>> "Stan Weiss" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >
>> >
>> > 1Adata wrote:
>> >>
>> >> "Jim" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> >
>> >> > "1Adata" <(E-Mail Removed)> wrote in message
>> >> > news:O3%(E-Mail Removed)...
>> >> >>
>> >> >> "HeyBub" <(E-Mail Removed)> wrote in message
>> >> >> news:%(E-Mail Removed)...
>> >> >>> 1Adata wrote:
>> >> >>> > is there simple standalone freeware utility to convert
>> >> >>> > decimal-hex-binary values?
>> >> >>> >
>> >> >>> > 0 = 0xFFFF = 1111 1111 1111 1111
>> >> >>> > 1 = 0xFFFE = 1111 1111 1111 1110
>> >> >>> > 2 = 0xFFFC = 1111 1111 1111 1100
>> >> >>> > 3 = 0xFFF8 = 1111 1111 1111 1000
>> >> >>> > ...
>> >> >>> > can no find one that preserve results exactly in this format.
>> >> >>>
>> >> >>> Of course not. The equations you offer are wrong, i.e.,
>> >> >>>
>> >> >>> 0 = 0x0000 = 0000 0000 0000 0000
>> >> >>>
>> >> >>> They are not even negatives:
>> >> >>>
>> >> >>> -1 = 0xFFFF = 1111 1111 1111 1111
>> >> >>>
>> >> >> ----------
>> >> >>
>> >> >> sorry I was mistaken, I got confused, it looks the correct is only
>> >> >> hex
>> >> >> to
>> >> >> binary conformity, the decimal numbers are wrong.
>> >> >> Its just communication with microcontroller, there is a sort of
>> >> >> counter,
>> >> >> for
>> >> >> instance, when a card has three rides left the value is
>> >> >> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111
>> >> >> 1111
>> >> >> 1100),
>> >> >> one ride equals 0xFFFE
>> >> >> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111
>> >> >> 1111).
>> >> >> But
>> >> >> looks decimal numbers does not conform the hex and binary format.
>> >> >>
>> >> > It is the card which is confusing you. It is not reporting its
>> >> > status
>> >> > in
>> >> > normal format. The only way to get a report in the format that you
>> >> > desire
>> >> > is to prepare your own program.
>> >> >
>> >> > In essence, hex FFFF equals -1 decimal.
>> >> > Hex FFFe = -2 decimal
>> >> > Hex FFF8 = -32 decimal
>> >> >
>> >> > This is true for a machine which uses 2's complement arithmetic.
>> >> >
>> >> > Jim
>> >> -----------
>> >>
>> >> I have no task to get report in my custom format, just trying to
>> >> understand
>> >> how to program card if I need charge card for 10-rides or 20-rides,
>> >> what
>> >> data I should write to card?
>> >
>> > Based on the logic shown by your example
>> >> 0 = 0xFFFF = 1111 1111 1111 1111
>> >> 1 = 0xFFFE = 1111 1111 1111 1110
>> >> 2 = 0xFFFC = 1111 1111 1111 1100
>> >> 3 = 0xFFF8 = 1111 1111 1111 1000
>> >
>> > 16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go

>>
>> -----------
>> 0,1,2,3 - is not digits, its just rides quantity, it does not conform the
>> hex and binary format.

>
> It is also a count of how many bits are set to zero "0"

---------

just wondering how would be 20-rides, based on their logic?

 
Reply With Quote
 
Bob I
Guest
Posts: n/a
 
      3rd Jun 2009


1Adata wrote:

>
> "Stan Weiss" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>
>>
>> 1Adata wrote:
>>
>>>
>>> "Jim" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>> >
>>> > "1Adata" <(E-Mail Removed)> wrote in message
>>> > news:O3%(E-Mail Removed)...
>>> >>
>>> >> "HeyBub" <(E-Mail Removed)> wrote in message
>>> >> news:%(E-Mail Removed)...
>>> >>> 1Adata wrote:
>>> >>> > is there simple standalone freeware utility to convert
>>> >>> > decimal-hex-binary values?
>>> >>> >
>>> >>> > 0 = 0xFFFF = 1111 1111 1111 1111
>>> >>> > 1 = 0xFFFE = 1111 1111 1111 1110
>>> >>> > 2 = 0xFFFC = 1111 1111 1111 1100
>>> >>> > 3 = 0xFFF8 = 1111 1111 1111 1000
>>> >>> > ...
>>> >>> > can no find one that preserve results exactly in this format.
>>> >>>
>>> >>> Of course not. The equations you offer are wrong, i.e.,
>>> >>>
>>> >>> 0 = 0x0000 = 0000 0000 0000 0000
>>> >>>
>>> >>> They are not even negatives:
>>> >>>
>>> >>> -1 = 0xFFFF = 1111 1111 1111 1111
>>> >>>
>>> >> ----------
>>> >>
>>> >> sorry I was mistaken, I got confused, it looks the correct is only
>>> hex >> to
>>> >> binary conformity, the decimal numbers are wrong.
>>> >> Its just communication with microcontroller, there is a sort of >>
>>> counter,
>>> >> for
>>> >> instance, when a card has three rides left the value is
>>> >> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111 1111
>>> >> 1100),
>>> >> one ride equals 0xFFFE
>>> >> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111
>>> >> 1111).
>>> >> But
>>> >> looks decimal numbers does not conform the hex and binary format.
>>> >>
>>> > It is the card which is confusing you. It is not reporting its
>>> status > in
>>> > normal format. The only way to get a report in the format that you
>>> > desire
>>> > is to prepare your own program.
>>> >
>>> > In essence, hex FFFF equals -1 decimal.
>>> > Hex FFFe = -2 decimal
>>> > Hex FFF8 = -32 decimal
>>> >
>>> > This is true for a machine which uses 2's complement arithmetic.
>>> >
>>> > Jim
>>> -----------
>>>
>>> I have no task to get report in my custom format, just trying to
>>> understand
>>> how to program card if I need charge card for 10-rides or 20-rides, what
>>> data I should write to card?

>>
>>
>> Based on the logic shown by your example
>>
>>> 0 = 0xFFFF = 1111 1111 1111 1111
>>> 1 = 0xFFFE = 1111 1111 1111 1110
>>> 2 = 0xFFFC = 1111 1111 1111 1100
>>> 3 = 0xFFF8 = 1111 1111 1111 1000

>>
>>
>> 16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go

>
>
> -----------
> 0,1,2,3 - is not digits, its just rides quantity, it does not conform
> the hex and binary format.
>


If you write 0 decimal to the card you get 16 rides.

Using the 10 rides for example you will need 6 ones and 10 zeros. So,
if you look at Windows Calculator in Bin mode and hit 1111 11 then 00
0000 0000, and then select Dec. You will see that you need to put 64512
on the card.

 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      3rd Jun 2009

"1Adata" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> "Stan Weiss" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>>
>> 1Adata wrote:
>>>
>>> "Stan Weiss" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>> >
>>> >
>>> > 1Adata wrote:
>>> >>
>>> >> "Jim" <(E-Mail Removed)> wrote in message
>>> >> news:(E-Mail Removed)...
>>> >> >
>>> >> > "1Adata" <(E-Mail Removed)> wrote in message
>>> >> > news:O3%(E-Mail Removed)...
>>> >> >>
>>> >> >> "HeyBub" <(E-Mail Removed)> wrote in message
>>> >> >> news:%(E-Mail Removed)...
>>> >> >>> 1Adata wrote:
>>> >> >>> > is there simple standalone freeware utility to convert
>>> >> >>> > decimal-hex-binary values?
>>> >> >>> >
>>> >> >>> > 0 = 0xFFFF = 1111 1111 1111 1111
>>> >> >>> > 1 = 0xFFFE = 1111 1111 1111 1110
>>> >> >>> > 2 = 0xFFFC = 1111 1111 1111 1100
>>> >> >>> > 3 = 0xFFF8 = 1111 1111 1111 1000
>>> >> >>> > ...
>>> >> >>> > can no find one that preserve results exactly in this format.
>>> >> >>>
>>> >> >>> Of course not. The equations you offer are wrong, i.e.,
>>> >> >>>
>>> >> >>> 0 = 0x0000 = 0000 0000 0000 0000
>>> >> >>>
>>> >> >>> They are not even negatives:
>>> >> >>>
>>> >> >>> -1 = 0xFFFF = 1111 1111 1111 1111
>>> >> >>>
>>> >> >> ----------
>>> >> >>
>>> >> >> sorry I was mistaken, I got confused, it looks the correct is only
>>> >> >> hex
>>> >> >> to
>>> >> >> binary conformity, the decimal numbers are wrong.
>>> >> >> Its just communication with microcontroller, there is a sort of
>>> >> >> counter,
>>> >> >> for
>>> >> >> instance, when a card has three rides left the value is
>>> >> >> 0xFFF8 (1111 1111 1111 1000). Two rides equals 0xFFFC (1111 1111
>>> >> >> 1111
>>> >> >> 1100),
>>> >> >> one ride equals 0xFFFE
>>> >> >> (1111 1111 1111 1110) and no rides equals 0xFFFF (1111 1111 1111
>>> >> >> 1111).
>>> >> >> But
>>> >> >> looks decimal numbers does not conform the hex and binary format.
>>> >> >>
>>> >> > It is the card which is confusing you. It is not reporting its
>>> >> > status
>>> >> > in
>>> >> > normal format. The only way to get a report in the format that you
>>> >> > desire
>>> >> > is to prepare your own program.
>>> >> >
>>> >> > In essence, hex FFFF equals -1 decimal.
>>> >> > Hex FFFe = -2 decimal
>>> >> > Hex FFF8 = -32 decimal
>>> >> >
>>> >> > This is true for a machine which uses 2's complement arithmetic.
>>> >> >
>>> >> > Jim
>>> >> -----------
>>> >>
>>> >> I have no task to get report in my custom format, just trying to
>>> >> understand
>>> >> how to program card if I need charge card for 10-rides or 20-rides,
>>> >> what
>>> >> data I should write to card?
>>> >
>>> > Based on the logic shown by your example
>>> >> 0 = 0xFFFF = 1111 1111 1111 1111
>>> >> 1 = 0xFFFE = 1111 1111 1111 1110
>>> >> 2 = 0xFFFC = 1111 1111 1111 1100
>>> >> 3 = 0xFFF8 = 1111 1111 1111 1000
>>> >
>>> > 16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go
>>>
>>> -----------
>>> 0,1,2,3 - is not digits, its just rides quantity, it does not conform
>>> the
>>> hex and binary format.

>>
>> It is also a count of how many bits are set to zero "0"

> ---------
>
> just wondering how would be 20-rides, based on their logic?

What the card is reporting is the number of cleared bits. Hence, you would
need 20 bits to get to 20-rides.
Jim



 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      3rd Jun 2009
Bob I wrote:

>>>
>>> Based on the logic shown by your example
>>>
>>>> 0 = 0xFFFF = 1111 1111 1111 1111
>>>> 1 = 0xFFFE = 1111 1111 1111 1110
>>>> 2 = 0xFFFC = 1111 1111 1111 1100
>>>> 3 = 0xFFF8 = 1111 1111 1111 1000
>>>
>>>
>>> 16 = 0x0000 = 0000 0000 0000 0000 will be the highest you can go

>>
>>
>> -----------
>> 0,1,2,3 - is not digits, its just rides quantity, it does not conform
>> the hex and binary format.
>>

>
> If you write 0 decimal to the card you get 16 rides.
>
> Using the 10 rides for example you will need 6 ones and 10 zeros. So,
> if you look at Windows Calculator in Bin mode and hit 1111 11 then 00
> 0000 0000, and then select Dec. You will see that you need to put 64512
> on the card.
>


All this to ride the bus ? :-)

http://www.rigainside.info/2009/05/p...h-and-how.html

*******

Why not buy the denomination of card to be duplicated, and just
read the number off it, and then again after each ride. That way,
you can generate a table of values.

Paul
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gibberish Text when open with file coverter =?Utf-8?B?VHJ1bmcgUXVhY2g=?= Microsoft Word Document Management 3 9th Nov 2005 11:28 AM
EXE to TXT Coverter Eduardo Hercos Rodrigues Freeware 18 13th Sep 2005 10:22 AM
Word 6.0/95 text coverter annoying message WHEN i try to save JimC123 Microsoft Word New Users 3 10th Aug 2004 04:56 PM
IDE to SATA coverter question Raven Asus Motherboards 2 20th Jul 2003 03:03 PM
Re: harvard graphics coverter needed TAJ Simmons Microsoft Powerpoint 0 30th Jun 2003 10:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:16 AM.