You should be able to solve this

You should be able to solve this

Other urls found in this thread:

wolframalpha.com/input/?i=50-((2<<5)+(7>3))
twitter.com/NSFWRedditVideo

OP

too many.

not enough obviously

>50 - ((2 3))
>50 - (64 + 1)
-15 niggers?

The universe breaks because you can't add a number to a the boolean True (from 7 > 3)

>-15 niggers?
The way it should be

Wait, what does the represent and how do you use it in this equation?

not in C.

That's why the universe is programmed in C

also, isn't 2^5 = 32?

Left and right shifting, my friend

64

(7 > 3) evaluates to 1 in C because it's true.
So that would be 65.
50 - 65 = -15

wolframalpha.com/input/?i=50-((2<<5)+(7>3))

It's been computing for a while now. I guess you're the smartest person ever.

Or you're a fucking idiot.

A logical shift operation is not the same as the Power Of operation.

2

so it would be 2^n+1 if I wanted to put it in my calculator?

I meant 2^(n+1) in a calculator

I guess multiplying something by itself in computing would be very fast

It'd be more accurate to say x * 2^n, where n is the number to the right of the

but 2^(5+1) = 2^6 = 64

2^(5+1) = (2

You need to remember that the 3
01100000 => 96

If we used your example, we'd have a situation where 3^(5+1) would somehow equal 96, but 3^6 = 729...

Whereas 3 * 2^5 = 3 * 32 = 96

What fucking mouth breather uses bit shifts on integers.

It's 2 * 2^1. If it was 5

00000010 is 2
5 to da left
so you get
01000000 which is 64
+ 1

-15 left?

uwotm8

this desu
way to make your code unreadable

50-65

It's a fast way to calculate 2^(x+1)

x*(2^n) rather

x=2
shift (n) = 5

2*(32) = 64

>not saving state in bits and checking them by masking
web dev pls

Every modern optimizer will take care of it. Code is not meant to be well understood by CPUs, it's meant to be well understood by humans. That's why we don't code everything in Assembly any longer. Optimizers take care of it and in 99.9% of all cases better than you ever could.

So stop using shit like bitshifts for powers, it makes no sense any longer.

how the fuck are you gonna shift a nigger to bits?

Fucking this

Python has a module

Can compilers optimize everything? I know it automatically does stuff like replacing optimizing mathematical expressions but for certain optimizations like cache blocking and loop unrolling isn't it necessary for the programmer to write them in?