I’d been using the RPN/scientific mode for ever but never new about Programmer mode.
I’m actually doing a fair amount of hex conversions and bit fiddling these days (webassembly bytecode) so it was actually something useful.
11–20 of 48 posts
I’d been using the RPN/scientific mode for ever but never new about Programmer mode.
I’m actually doing a fair amount of hex conversions and bit fiddling these days (webassembly bytecode) so it was actually something useful.
Is it an autocorrect issue or the writer only-heard-never-read that the "^" character is called a “carrot”?
> right shifting adds zeros to the most significant side. So, using the same number we get… 1110 >> 4 -> 0000 1110
> right shifting adds zeros to the most significant side. So, using the same number we get… 1110 >> 4 -> 0000 1110
For anyone interested in binary chess math:
https://www.chessprogramming.org/Bitboards#General_Bitboard_...
Is it an autocorrect issue or the writer only-heard-never-read that the "^" character is called a “carrot”?
The "^" character is correctly named the "caret".
Also, in INTERCAL the character is called “shark” or “sharkfin”.
Who is this article for exactly? It starts off by trying to relate to the reader by presenting the point about learning a new programming language, but then goes on to explain one of the most fundamental concepts of computing, as if the reader is a complete novice. I would imagine that nearly every person with programming experience, whether that be formal or not, would have at least some familiarity with binary repr…
There's a whole generation of programmers that aren't interested in, and don't need, "low level" bitwise operations. I would claim that's a "good thing", since it means they're letting someone else do the "boring stuff" by using libraries, allowing them to spend more time solving higher level problems.
When I was going to school, some sort of assembler was the first language you learned. These days, it's usually Python or Java. With a "not real programmers" silliness aside, I hope the tedium continues to decline, and is left for those interested in it, increasing productivity for everyone.
Really weird to start with 'that one section that most of us skip' and then use an _instruction set emulator_ as the real world example. Who exactly is both frightened of the & symbol and wants to learn about instruction encoding?
"While at first, they might seem obscure, unhelpful, or tools for people who write in low level programming languages, they do serve a purpose. "
But then... Instructions set, assembly language...
So I wrote some straight C, some nested for loops for row/column of the area to be patterned. I used row % 4, column % 4 to map to the appropriate bit within the Uint16 "pattern". Some bit shifting, masking and I knew whether to fill the pixel with foreground or background colors.
I always enjoy bitwise operations. (There's I guess the classic programmer problem of swapping the values of two numbers in two registers in place.)