Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Programming Help (Bitwise shift C++)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Thu Jan 08, 2009 7:34 am    Post subject: Programming Help (Bitwise shift C++) Reply with quote

I can not understand what << and >> do in terms of the C programming language. While its simple enough with strings (an append operator) or with the use of the iostream header, in context of ints I cant seem to understand it. I know what a bit is, what shift is, and what left is, but I dont know what a shift left bitwise operator is, the same goes for right too.



P.S. Since I know that nearly everyone here is a rep whore, the first person to help me understand it (no copy and pasting random tutorials or giving me links, but seriously helping) will get +rep.

_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Thu Jan 08, 2009 8:06 am    Post subject: Reply with quote

<< and >> show input/ouput in console
now go to generaly programming

_________________
Back to top
View user's profile Send private message
Codeslinger
I post too much
Reputation: 1

Joined: 11 Oct 2007
Posts: 3652
Location: Midwest, United States of America

PostPosted: Thu Jan 08, 2009 11:21 am    Post subject: Reply with quote

92Garfield wrote:
<< and >> show input/ouput in console
now go to generaly programming


Yeah, ">>" and "<<" are only for showing text in a DOS console -- there is an entire built in C++ feature just for doing this, they cannot be used for anything except displaying text in a DOS console. Rolling Eyes

Here is what you're looking for:

http://www.contactor.se/~dast/fpl-old/language/shift.HTML

Also:

http://msdn.microsoft.com/en-us/library/f96c63ed.aspx
Back to top
View user's profile Send private message MSN Messenger
SGL
Grandmaster Cheater
Reputation: 14

Joined: 04 May 2007
Posts: 758

PostPosted: Thu Jan 08, 2009 12:41 pm    Post subject: Reply with quote

<< means greater greater than
>> means less less than

_________________
I'm SirGodlike
Back to top
View user's profile Send private message
Rick.
Grandmaster Cheater
Reputation: 6

Joined: 02 Jul 2008
Posts: 657
Location: In the netherlands

PostPosted: Thu Jan 08, 2009 12:44 pm    Post subject: Reply with quote

look at your left hand.

congratulations, u found left!

look at your right hand.

Congratulations, u found right!
Back to top
View user's profile Send private message MSN Messenger
Pedo Bear
Expert Cheater
Reputation: 0

Joined: 16 Aug 2007
Posts: 124

PostPosted: Thu Jan 08, 2009 12:45 pm    Post subject: Reply with quote

freezeGTA wrote:
look at your left hand.

congratulations, u found left!

look at your right hand.

Congratulations, u found right!
no u
Back to top
View user's profile Send private message
Rick.
Grandmaster Cheater
Reputation: 6

Joined: 02 Jul 2008
Posts: 657
Location: In the netherlands

PostPosted: Thu Jan 08, 2009 12:46 pm    Post subject: Reply with quote

PANIC ATTACK wrote:
freezeGTA wrote:
look at your left hand.

congratulations, u found left!

look at your right hand.

Congratulations, u found right!
no u

i already did!
Back to top
View user's profile Send private message MSN Messenger
Cheat Engine User
Something epic
Ban
Reputation: 61

Joined: 22 Jun 2007
Posts: 2071

PostPosted: Thu Jan 08, 2009 1:00 pm    Post subject: Reply with quote

92Garfield wrote:
<< and >> show input/ouput in console
now go to generaly programming
Holy shit, read the fucking title!

it moves the bits of your value the many times as you state.

Ill take 4 as an example, thats 0100 in binary

Bitwise shift left means it shift it one time to the left, making it 1000, resulting in a value of 8.

Shifting again will result in 0001, or 1.

Etc.

Same goes for right
Back to top
View user's profile Send private message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Thu Jan 08, 2009 2:01 pm    Post subject: Reply with quote

Holland wrote:
92Garfield wrote:
<< and >> show input/ouput in console
now go to generaly programming
Holy shit, read the fucking title!

it moves the bits of your value the many times as you state.

Ill take 4 as an example, thats 0100 in binary

Bitwise shift left means it shift it one time to the left, making it 1000, resulting in a value of 8.

Shifting again will result in 0001, or 1.

Etc.

Same goes for right


How does one determine what is shifted? Obviously there are numbers whose binary representation may contain multiple zeroes and ones. Either way, you won the rep of you choice.

_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Thu Jan 08, 2009 2:05 pm    Post subject: Reply with quote

Holland wrote:
92Garfield wrote:
<< and >> show input/ouput in console
now go to generaly programming
Holy shit, read the fucking title!

it moves the bits of your value the many times as you state.

Ill take 4 as an example, thats 0100 in binary

Bitwise shift left means it shift it one time to the left, making it 1000, resulting in a value of 8.

Shifting again will result in 0001, or 1.

Etc.

Same goes for right

I made a calc in C++

using cin >> stuff and cout << "stuff"

_________________
Back to top
View user's profile Send private message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Thu Jan 08, 2009 2:09 pm    Post subject: Reply with quote

92Garfield wrote:
Holland wrote:
92Garfield wrote:
<< and >> show input/ouput in console
now go to generaly programming
Holy shit, read the fucking title!

it moves the bits of your value the many times as you state.

Ill take 4 as an example, thats 0100 in binary

Bitwise shift left means it shift it one time to the left, making it 1000, resulting in a value of 8.

Shifting again will result in 0001, or 1.

Etc.

Same goes for right

I made a calc in C++

using cin >> stuff and cout << "stuff"

The << and >> operator has many uses, its all based on context. Also I program (or am starting to) using the Win API.

_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
Cheat Engine User
Something epic
Ban
Reputation: 61

Joined: 22 Jun 2007
Posts: 2071

PostPosted: Fri Jan 09, 2009 5:08 am    Post subject: Reply with quote

Aviar wrote:
Holland wrote:
92Garfield wrote:
<< and >> show input/ouput in console
now go to generaly programming
Holy shit, read the fucking title!

it moves the bits of your value the many times as you state.

Ill take 4 as an example, thats 0100 in binary

Bitwise shift left means it shift it one time to the left, making it 1000, resulting in a value of 8.

Shifting again will result in 0001, or 1.

Etc.

Same goes for right


How does one determine what is shifted? Obviously there are numbers whose binary representation may contain multiple zeroes and ones. Either way, you won the rep of you choice.
Usually you shift a certain entered value. it does it for you, just showing you how it's done.

And I didnt need to get rep, but this obvious shit had to be answered correctly.
Back to top
View user's profile Send private message
Deletion
I post too much
Reputation: 0

Joined: 22 Jun 2006
Posts: 2148
Location: Underground

PostPosted: Fri Jan 09, 2009 3:27 pm    Post subject: Reply with quote

weeeeeeeeeeeeeeeeeeeeeeee random spam.
_________________
Bitch, please.
redslothx wrote:
oh im a man so respect the penis powers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites