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
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
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
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
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
>
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!
>
> 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
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
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
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
>
uh oh, i've started another big debate :)
carry on, it's interesting stuff...
--
[EMAIL PROTECTED]http://x-map.home.ml.org
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
(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.
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
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
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
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
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]>
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]> |(
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
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
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
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
23 matches
Mail list logo