Staredit Network Global Shoutbox
Members in Shoutbox

Shoutbox Search
You may search for a phrase in the shoutbox.

Search for:


Shoutboxcommands
/w [name] Whispers.
/r Answers to whisperer.
/me Marks as action.

Shoutbox Information
Moderators may delete one or more of your shouts at any given time without notice and reason.
The Shoutbox may be good to ask for small pieces of advice, but for real questions, you still want to use our Forums
Global Shoutbox

Pages: < 1 2 3 4 5 277 >

[12:01 pm]
TF- -- Cocalari...
[11:58 am]
Generalpie -- being camped*
[11:58 am]
Generalpie -- Considering my very first match against humans was 25 minutes of play time, and 20 minutes of camping the spawn.
[11:50 am]
Generalpie -- Even a 100% vote would be great
[11:49 am]
Generalpie -- It doesn't even have to be 3/5 or 4/5
[11:44 am]
Generalpie -- DOTA 2 is cool. The only thing it needs is a surrender button...
[11:33 am]
RIVE -- :wob:
[10:39 am]
Mini Moose 2707 -- :wob:
[06:33 am]
O)FaRTy1billion[MM] -- Even if it's unsigned, -1 works
[06:33 am]
O)FaRTy1billion[MM] -- l)ark_ssj9kevin
l)ark_ssj9kevin shouted: if this is unsigned you can do ~0U to get all 1's, regardless of what size integer it is
I just use -1./
[05:22 am]
NudeRaider -- everything is made out of nipples, even this shout
[05:22 am]
NudeRaider -- nipple, demon. it's all nipples
[05:05 am]
poiuy_qwert -- a nibble is 4 bits, a byte is 2 nibbles or 8 bits
[05:04 am]
Dem0n -- And what do you mean by nibble?
[05:04 am]
Dem0n -- well fuck them
[05:03 am]
poiuy_qwert -- thats the thing, the question is wrong. its should be getSecondNibbleFromLR
[05:02 am]
Dem0n -- if a short is 2 bytes*
[05:02 am]
Dem0n -- if a short byte is only 2 bytes, how does shifting the bits by 12 work?
[04:59 am]
poiuy_qwert -- char a = 0x1F; short b = 0x1F; long c = 0x1F;
[04:59 am]
poiuy_qwert -- it depends on the size of the variable thats storing that number
[04:57 am]
Dem0n -- I always forget those extra 0's when dealing with hexidecimals
[04:57 am]
Dem0n -- if you had like 0x1f, would that be represented as 0000000000011111>
[04:55 am]
poiuy_qwert -- so the answer should be (a << 8) >> 16
[04:54 am]
Dem0n -- oh fuck i forgot the first set of 0's again
[04:53 am]
poiuy_qwert -- ((0000111100000000 << 4) >> 12) == (1111000000000000 >> 12) == 0000000000001111
[04:52 am]
poiuy_qwert -- that seems to be getting the second nibble not second byte
[04:47 am]
Dem0n -- why*
[04:47 am]
Dem0n -- Unless I don't actually get my it's being shifted to the left 4, in which case I would definitely not know why it's shifted to the right 12 times
[04:46 am]
Dem0n -- I get why you shift it to the left 4 bits, but I don't understand what shifting it to the right 12 bits accomplishes
[04:46 am]
Dem0n -- what is this nonsense
[2014-10-21. : 4:40 am]
jjf28 -- only half the problem, silly :nude:
[2014-10-21. : 4:36 am]
NudeRaider -- jj, just create the username of what you want to quote - problem solved. :awesome:
[2014-10-21. : 4:33 am]
Dem0n -- Oh, apparently it still returns 2
[2014-10-21. : 4:33 am]
jjf28 -- don't see it in the documentation... ferror might be set (conditions for ferror? can't find them)
[2014-10-21. : 4:29 am]
Dem0n -- if you input an int and a double, but scanf is expecting two ints, will it return 1, 2, or will there be an error?
[2014-10-21. : 4:23 am]
jjf28 -- I want candy... tempted to be that creepy 20yr old out trick 'or' treating without a kid :P
[2014-10-21. : 4:08 am]
Dem0n -- I was like why would you AND it by 1 because if you're rotating from the left you'll just get 00000000 lul
[2014-10-21. : 4:07 am]
Dem0n -- Ohh that's what I was confused about
[2014-10-21. : 4:07 am]
poiuy_qwert -- and as farty was saying, if you need to do it to the left, you need to grab the leftmost bit, which would be (a & 128)
[2014-10-21. : 4:06 am]
Dem0n -- oh
[2014-10-21. : 4:04 am]
poiuy_qwert -- 10000101
[2014-10-21. : 4:04 am]
poiuy_qwert -- 10000000 | 00000101
[2014-10-21. : 4:04 am]
poiuy_qwert -- (00000001 << 7) | 00000101
[2014-10-21. : 4:04 am]
poiuy_qwert -- ((00001011 & 00000001) << 7) | (00001011 >> 1)
[2014-10-21. : 4:02 am]
Dem0n -- wut
[2014-10-21. : 4:01 am]
poiuy_qwert -- since its shifting to the right, its grabbing the rightmost bit since it will be dropped
[2014-10-21. : 4:00 am]
Dem0n -- poiuy_qwert
poiuy_qwert shouted: so for correctness: ((a & 1) << 7) | (a >> 1)
What does ANDing a by 1 do?
[2014-10-21. : 4:00 am]
l)ark_ssj9kevin -- i remember rotating bits was an exercise in k&r, it was kinda fun
[2014-10-21. : 3:59 am]
Dem0n -- I feel like it might be a question on my exam
[2014-10-21. : 3:59 am]
Vrael -- why are you guys rotating bits?
[2014-10-21. : 3:58 am]
jjf28 -- o
[2014-10-21. : 3:55 am]
Dem0n -- well I mean I was just writing 11000010 and then dropping those 1's when I shifted it, which obviously isn't correct
[2014-10-21. : 3:51 am]
jjf28 -- you can go without, good habit to write them in if others see your work though
[2014-10-21. : 3:51 am]
Dem0n -- didn't realize you need those first 5 zeros o_o
[2014-10-21. : 3:50 am]
Dem0n -- oh
[2014-10-21. : 3:50 am]
jjf28 -- (0 0000 1100 0010) << 5 == (1 1000 0100 0000)
[2014-10-21. : 3:49 am]
jjf28 -- 0xC2 << 5 == 0x1840
[2014-10-21. : 3:49 am]
l)ark_ssj9kevin -- if this is unsigned you can do ~0U to get all 1's, regardless of what size integer it is
[2014-10-21. : 3:48 am]
Dem0n -- how does 0xc2 << 5 = 1840?
[2014-10-21. : 3:33 am]
poiuy_qwert -- to wrap a byte 's' bits
[2014-10-21. : 3:33 am]
jjf28 -- perhaps there's a standard lib function somewhere for it
[2014-10-21. : 3:32 am]
poiuy_qwert -- ((a & (2**s-1)) << (8-s)) | (a >> s)
[2014-10-21. : 3:32 am]
jjf28 -- why are you rotating bits? :P
[2014-10-21. : 3:32 am]
O)FaRTy1billion[MM] -- hey why doesn't C have an easy way to rotate bits? I never thought about that
[2014-10-21. : 3:31 am]
jjf28 -- i like poiuy's, if you can remember it :) pretty much just takes the same algorithm into 1 line (and the numbers he used are for 8-bit numbers)
[2014-10-21. : 3:27 am]
jjf28 -- just tells you if the bit you're about to lose is set
[2014-10-21. : 3:27 am]
Dem0n -- and what are you checking with it?
[2014-10-21. : 3:27 am]
Dem0n -- what does wrapBit do?
[2014-10-21. : 3:24 am]
jjf28 -- http://puu.sh/ckkFP/88ebb5e21e.png
[2014-10-21. : 3:23 am]
jjf28 -- so in the most basic terms: you shift 1 bit at a time, if the bit you're about to lose is set (which you can check with AND), you need to set it on the other end (which you can do after the shift with OR)

Pages: < 1 2 3 4 5 277 >


Members Online: jjf28, Sand Wraith, sigsaucy, Roy, iCCup.xboi209, Dem0n