+ 3

A way to remember Booleans

Equal == it is like saying yes yes it does equal Not Equal != imagine this sign "!" as the first part of wrting Not, when you write the letter N you gotta use l first then \ then I so it would be like l\l so if you do it like !\!, it would be easier to remember.

30th Mar 2018, 12:11 AM
Medo Hamdani
Medo Hamdani - avatar
11 odpowiedzi
+ 11
Be careful there: == and != aren't booleans. They are relational operators which return booleans. A boolean is a 1 bit datatype, so it can either be 1 (true) or 0 (false).
30th Mar 2018, 12:43 AM
Chris
Chris - avatar
+ 4
Chris Actually the size of a boolean datatype is at least 1 Byte (8bits) because in this way it can be addressed. Memory is addressable in bytes, not in bits.
30th Mar 2018, 3:23 AM
seamiki
seamiki - avatar
+ 3
Hey Jan, will simplify my riddles next time.
30th Mar 2018, 12:33 AM
Medo Hamdani
Medo Hamdani - avatar
+ 2
Thank you Chris for the elaboration :)
30th Mar 2018, 12:45 AM
Medo Hamdani
Medo Hamdani - avatar
+ 2
Oops, seamiki is right! I answered at 2am, sorry for the mistake.
30th Mar 2018, 8:49 AM
Chris
Chris - avatar
+ 1
StoneSmasher that's why i wrote "....boolean datatype is AT LEAST 1 Byte...."
31st Mar 2018, 7:45 AM
seamiki
seamiki - avatar
0
seamiki actually a booleans size is 1 byte OR greater, it depends on how it was implemented in the compiler.
30th Mar 2018, 5:51 PM
StoneSmasher
StoneSmasher - avatar
0
I wish there's a simpler way to understand all these you guys are discussing for newbies like me 🤔😟
3rd Jul 2018, 6:13 AM
Aisha Abdulazeez🇳🇬
Aisha Abdulazeez🇳🇬 - avatar
0
Ashonsy🇳🇬 what part didn't you get?
3rd Jul 2018, 8:50 AM
Medo Hamdani
Medo Hamdani - avatar
0
think am getting the it now...== means yes yes whiles !\! means No
17th Oct 2019, 6:28 PM
Emmanuel Asuah Danful
20th Feb 2021, 5:55 AM
Kailash Singh
Kailash Singh - avatar