Re: Binary

1998-09-03 Thread James
On Tue, 1 Sep 1998, Josh Muckley wrote: -You need to find the pinouts of the parallel port and then just -connect a led from a data line to a ground line. There are three -differant types of lines in your p-port. The first and most important -is DATA (out), the second is STATUS (in) and the thi

Re: Binary

1998-09-02 Thread Josh Muckley
You need to find the pinouts of the parallel port and then just connect a led from a data line to a ground line. There are three differant types of lines in your p-port. The first and most important is DATA (out), the second is STATUS (in) and the third is CONTROL (i/o). You can find a lot more

Re: Binary

1998-08-31 Thread Andrew P. Bell
Yes, what makes binary<->hex conversion difficult? It is about the most natural conversion one can do. Each nibble is a hex character -- simple. No need to break out a calculator or abacus for God's sake. Anyway, macros or enumerated types will obviously be nicer to read than

Re: Binary

1998-08-30 Thread James
On Sun, 30 Aug 1998, Chetan Sakhardande wrote: -No way. - -Just curious -- why? you ever seen that diagram that shows how to connect LEDs to the data lines on your parallel port? well i wanted it to flash different patterns (for no good reason) and it's 1 bit per led, 1 on, 0 off. specifying 101

Fw: Problem w/binary read istream::read

1998-08-30 Thread Charles W. Doolittle, N1SPX
8 1:55 AM Subject: Problem w/binary read istream::read >Hi all - have the following code snippet > >#include >.. > ifstream is("menu.dat", ios::binary|ios::nocreate); >while ( is.good() ) { >// Read a record in, then add it to the menu >

Re: Binary

1998-08-30 Thread Glynn Clements
James wrote: > -> How do you use binary numbers in C? i'm sure i once knew... > -> > -> i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > - > -ANSI C doesn't provide any way to specify numbers in binary. > > ahh... oops!

Re: Binary

1998-08-30 Thread David Ross
> > Well, just adding another base (and a power 2 base, at that) doesn't look > like that much of a feature bloat. > I mean, yeah, right, octal and hexadecimal but no binary? > Doesn't that look like K&R cared only for 2 machines (one with 9 bit words > and another

Re: Binary

1998-08-30 Thread David Ross
seems a > > > bit clearer. > > > > I prefer having flags defined.. > > > > /* Some hypotetical flags for a device called RTB */ > > #define RTB_FLAG_AAB(1<<0) > > #define RTB_FLAG_ON_OFF (1<<1) > > #define RTB_FLAG_AAC

Re: Binary

1998-08-30 Thread holotko
James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > -- > [EMAIL PROTECTED]http://x-map.home.ml.org Offhand I know of no such "binary " con

Re: Binary

1998-08-30 Thread Chetan Sakhardande
No way. Just curious -- why? On Fri, 28 Aug 1998, James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > -- > [EMAIL PROTECTED]http://x-map.home.ml.org >

binary

1998-08-30 Thread James
uh oh, i've started another big debate :) carry on, it's interesting stuff... -- [EMAIL PROTECTED]http://x-map.home.ml.org

Re: Binary

1998-08-30 Thread James
On Sat, 29 Aug 1998, Glynn Clements wrote: - -James wrote: - -> How do you use binary numbers in C? i'm sure i once knew... -> -> i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... - -ANSI C doesn't provide any way to specify numbers in binary. - ahh

Re: Binary

1998-08-29 Thread Henrik Nordstrom
(1<<0) #define RTB_FLAG_ON_OFF (1<<1) #define RTB_FLAG_AAC(1<<2) #define RTB_FLAG_CCB(1<<3) And then compose the "binary" value using the flag names ZAP_FLAG_AAB | ZAP_FLAG_CCB It is quite a bit more to write, but a lot easier to read a few weeks later.

Re: Binary

1998-08-29 Thread Moshe Zadka
sentation provided the access and/or that literal bit > strings were "deprecated" and "counter-revolutionary" in the late sixties and > early seventies. > Well, just adding another base (and a power 2 base, at that) doesn't look like that much of a feature bloat. I

Re: Binary

1998-08-29 Thread David Ross
On Sat, 29 Aug 1998 15:58:08 +0300 (IDT) Moshe Zadka wrote: > > On Sat, 29 Aug 1998, Glynn Clements wrote: > > > > > Moshe Zadka wrote: > > > > > > How do you use binary numbers in C? i'm sure i once knew... > > > > > > &g

Re: Binary

1998-08-29 Thread Moshe Zadka
On Sat, 29 Aug 1998, Glynn Clements wrote: > > Moshe Zadka wrote: > > > > How do you use binary numbers in C? i'm sure i once knew... > > > > > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > > > There i

Re: Binary

1998-08-29 Thread Glynn Clements
Moshe Zadka wrote: > > How do you use binary numbers in C? i'm sure i once knew... > > > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > There is none. One of the major problems in C... Huh? In all of the time that I've been

Re: Binary

1998-08-29 Thread Glynn Clements
James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... ANSI C doesn't provide any way to specify numbers in binary. -- Glynn Clements <[EMAIL PROTECTED]>

Re: Binary

1998-08-29 Thread Moshe Zadka
On Fri, 28 Aug 1998, James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... There is none. One of the major problems in C... -- Moshe Zadka <[EMAIL PROTECTED]> |(

Problem w/binary read istream::read

1998-08-29 Thread Charles W. Doolittle, N1SPX
Hi all - have the following code snippet #include .. ifstream is("menu.dat", ios::binary|ios::nocreate); while ( is.good() ) { // Read a record in, then add it to the menu is.read((char*)&item1, sizeof(menu_item)); ... however, item1 never gets cha

Binary

1998-08-29 Thread James
How do you use binary numbers in C? i'm sure i once knew... i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... -- [EMAIL PROTECTED]http://x-map.home.ml.org

Re: Float to binary string (or Hex string I suppose)

1998-08-26 Thread Glynn Clements
Andrew Bell wrote: > I want to take a floating point number and determine it's binary > represention. This seems easy enough as the answer is right there in > memory. I can do this with a debugger, but other than dicking around with > memcopies, I can't see an easy way t

Float to binary string (or Hex string I suppose)

1998-08-26 Thread Andrew Bell
Hello all, I want to take a floating point number and determine it's binary represention. This seems easy enough as the answer is right there in memory. I can do this with a debugger, but other than dicking around with memcopies, I can't see an easy way to print out the memory c