🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #3267

Re: Vraagje ivm C

#3267
From: Davy Loots
Date: Sat, 17 Jan 2004 20:32
33 lines
1733 bytes
Een klein voorbeeldje:

|= bitwise OR
vb.
int a = 9; // == 00001001 binair
a |= 12; // 12 == 00001100 binair
resultaat :
a == 13; // == 00001101 binair

&= bitwise AND
vb.
int a = 9;
a &= 12;
resultaat :
a == 8; // == 00001000 binair

~ bitwise NOT
vb.
int a = ~13; // == 00001101 binair
resultaat
a == 242; // == 11110010 binair

Met vriendelijke groenten,
Davy


"flippend rund" <flippend@not.here.be> schreef in bericht
news:aqli00tmc95v3dfhik1jntd0q2r8kur7ra@4ax.com...
> Dat zijn bit-manipulaties die je kunt uitvoeren op integer data-types
> (char, short, int, long). Gelijk welk boek over C kan je dit in detail
> uitleggen.
>
>
Technical Details
Message-ID: <hZgOb.16964$9E7.3711085@phobos.telenet-ops.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.online.be!feed1.news.be.easynet.net!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
References: <qwcOb.16528$xq.3810365@phobos.telenet-ops.be> <aqli00tmc95v3dfhik1jntd0q2r8kur7ra@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,5787f286dda93359
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2004-01-17 12:32:14 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.online.be!feed1.news.be.easynet.net!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
From: "Davy Loots" <davy.loots@lenaers.com.nospam>
Newsgroups: be.comp.programming
References: <qwcOb.16528$xq.3810365@phobos.telenet-ops.be> <aqli00tmc95v3dfhik1jntd0q2r8kur7ra@4ax.com>
Subject: Re: Vraagje ivm C
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <hZgOb.16964$9E7.3711085@phobos.telenet-ops.be>
Date: Sat, 17 Jan 2004 20:32:13 GMT
NNTP-Posting-Host: 213.118.152.66
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1074371533 213.118.152.66 (Sat, 17 Jan 2004 21:32:13 MET)
NNTP-Posting-Date: Sat, 17 Jan 2004 21:32:13 MET
Organization: Telenet Internet