Understanding the power of bitwise operators
deusinmachina.net
Understanding the power of bitwise operators
1–10 of 48 posts
Re: Understanding the power of bitwise operators
#2Re: Understanding the power of bitwise operators
#3and use fixed fonts for all the numbers.
Re: Understanding the power of bitwise operators
#4If I may suggest, stop insulting your readers (e.g., several places implying reader does or does not do something 'normally', or not know something).
In cases where an error is well known, describe the error so it is understood you are using it as an example, and not an actual error (e.g., Null character (�) a black diamond with white question mark in the middle).
Single bit is the most often used type of data (vs "single bit is almost completely useless"). Your lights are on, or off; you are dead or alive; it is today or not, vast majority of network flags in various protocols are single bits.
There are a lot of weasel words throughout the post. If you plan to educate, uncertainty reduces comprehension and retention. There are some absolute statements are made too, but might rightfully questioned (e.g., [b]inary is the only language computers understand). Make sure your absolutes are truly absolutes.
Keep up the good work.
Re: Understanding the power of bitwise operators
#5Re: Understanding the power of bitwise operators
#6Re: Understanding the power of bitwise operators
#71110 >> 4 -> 0000 1110
Re: Understanding the power of bitwise operators
#8Re: Understanding the power of bitwise operators
#9All About XOR: https://accu.org/journals/overload/20/109/lewin_1915/
Re: Understanding the power of bitwise operators
#10I like introducing people to new concepts, and I will assume this entry is for non-technologists. This is an excellent start. If I may suggest, stop insulting your readers (e.g., several places implying reader does or does not do something 'normally', or not know something). In cases where an error is well known, describe the error so it is understood you are using it as an example, and not an actual error (e.g., Nul…
The description in the linked article is wrong, that's not a null character (U+0000) or ASCII's NUL. That black diamond symbol is U+FFFD the Unicode Replacement Character, it means "Something went wrong, so instead here is this symbol". For example if your decoder algorithm gets some gibberish and you can't or won't accept errors in decoding, a correctly designed decoder should produce U+FFFD each time, this is what Rust's String::from_utf8_lossy and String::from_utf16_lossy are doing.
U+FFFD was carefully chosen because it's not anything. It's not a letter, or a digit, it's not some ASCII control character, it's not a separator in any known writing system or protocol, it has no defined pre-existing purpose, which means if bad guys can trick your bad software into injecting U+FFFD into some data, chances are they achieved nothing of value.