The number and his complement must equal 0, if we applied the same rule for binary, we will end with number like, 111111 ,so we add 1(the second complement) to make it 0. Note: after adding 1, the left most 1 is discarded.
sir I want to ask a question that what is actually bit? does bit is transistor??? and 1 byte can store 255 values what does it mean??? is possible to store 255 characters???? plz simplyfy sir
Yes, you're right. A bit is a simple representation of 0 or 1. it's a two-state device. Either 0, or 1. I am not sure how a transistor works, though. When you combine 8 bits, you get a Byte. Now you have 256 possible combinations. Here's one combination 00010010 and here's another one: 00000001. Each combination is determined to represent a character, for example "A" or "4". That's how bits are combined into Bytes that are combined together to represent all of the required characters in all languages.
@@morsagmon9309 thank you so much sir....im also confused in term that an integer can store 65536 numbers how is it possible? although we know that integer can store 2 bytes which is equal to 16 bits means 16 zeros or ones. but what is 65536 numbers??
@@basharathussain5720 16 bits offers 65536 combinations: 0000000000000001 0000000000000011 0000000000000010 0000000000001011 0000011010110001 0011111111110001 ... ... ... If you have 16 bits, you can combine 2^16 combinations (2 to the power of 16) = 65536. If you have 2 bits only, you can combine 4 combinations (2^2 = 4). Here they are: 00 11 01 10
Question #01 An Array has a mix of 0s and 1s representing False and True Boolean values. Write function AllTrue() that returns 1 when all the entries in the array are true, and 0 when at least one of the entry in the array is false. Do Not Use Selection Structures. Question #02 An Array has a mix of 0s and 1s representing False and True Boolean values. Write function AnyTrue() that returns 0 when all the entries in the array are false, and 1 when at least one of the entry in the array is true. Do Not Use Selection Structures. Question #03 Allow the user to input the xy co-ordinates for n number of points in a two-dimensional co-ordinate system. Write a function to evaluate if all those points exist on the same straight line. You can use 2 single dimension arrays of length n. Question #04* Write a program that uses a function decoder(). Write the decoder() is such a way that it accepts 3 Boolean inputs, selects one of the 2 output bits, and writes a 0 or 1 (as provided by the user) on the selected bit. Question #05* Write a program that uses a function decoder(). Write the decoder() is such a way that it accepts 4 Boolean inputs, selects one of the 2 output bits, and writes a 0 or 1 (as provided by the user) on the selected bit. Question #06* Write a program that uses a function decoder(). Write the decoder() is such a way that it accepts variable length (e.g. 3, 4, 5) Boolean inputs, selects one of the 2 output bits, and writes a 0 or 1 (as provided by the user) on the selected bit. *An × 2 decoder is an electronic device. Its name is derived from the fact that it has number of input lines and 2 output lines. Out of these 2 outlines only one is selected based on the Boolean inputs on lines.
Hello sir, very nice explanation im new to programming and came here to know about bits, but i got some doubt, isn't computer take care of all this stuff(signing and other stuff) on its own then why bother learning this concept?
As a developer, the more you understand how things work under the cover - the greater your toolbox to write efficient solutions to various problems. For example, in the following Blog post, I explain how to take advantage of bits and bytes for a highly efficient and convenient technique: bit-wise enumerations: www.morsagmon.com/blog/Excel-VBA-Bit-Wise-Enumerations Similarly, if a scientist wants to develop a drug to handle immune issues, he needs to understand how the immune system works (not they really do, but that is another discussion...).
Hi. Most people should not care. A programmer should understand how things work, and sometimes may even need to implement a program that makes use of the bits & bytes of things. It's like a gardener that needs to understand about soil quality, pollination, etc. - not just stick a plant in the dirt and pour water...
BEST EXPLAINATION EVER!
Thank you!
That was amazing sir.
I always wonder how this works but from this video it is very clear now 😊
Happy to hear!
Very informative. Well simplified
Thank you!
Thank you so much for this, extremely helpful.
You're very welcome!
Superb explanation!
Thank you
You are welcomed!
understand this so good thanks sir
I didn't understand the negative numbers logic properly!
me too lol its need alot of almonds for that 😜😜
I understood the 2nd compliment but the 1st one was never explained
The number and his complement must equal 0, if we applied the same rule for binary, we will end with number like, 111111 ,so we add 1(the second complement) to make it 0.
Note: after adding 1, the left most 1 is discarded.
great content😁😁😁
very helpful for me!
Thank you!
Glad it helped!
Very helpful❤
thank you sir
sir you are great! thank you so much sir
Most welcome
sir I want to ask a question that what is actually bit? does bit is transistor??? and 1 byte can store 255 values what does it mean??? is possible to store 255 characters???? plz simplyfy sir
Yes, you're right.
A bit is a simple representation of 0 or 1. it's a two-state device. Either 0, or 1. I am not sure how a transistor works, though. When you combine 8 bits, you get a Byte. Now you have 256 possible combinations. Here's one combination 00010010 and here's another one: 00000001. Each combination is determined to represent a character, for example "A" or "4". That's how bits are combined into Bytes that are combined together to represent all of the required characters in all languages.
@@morsagmon9309 thank you so much sir....im also confused in term that an integer can store 65536 numbers how is it possible? although we know that integer can store 2 bytes which is equal to 16 bits means 16 zeros or ones. but what is 65536 numbers??
@@basharathussain5720
16 bits offers 65536 combinations:
0000000000000001
0000000000000011
0000000000000010
0000000000001011
0000011010110001
0011111111110001
...
...
...
If you have 16 bits, you can combine 2^16 combinations (2 to the power of 16) = 65536.
If you have 2 bits only, you can combine 4 combinations (2^2 = 4). Here they are:
00
11
01
10
@@morsagmon9309 sir i have an assignment in unversity and im in tense and so confused.....because of not understandin guestions.
Question #01 An Array has a mix of 0s and 1s representing False and True Boolean values. Write function AllTrue() that returns 1 when
all the entries in the array are true, and 0 when at least one of the entry in the array is false. Do Not Use Selection
Structures.
Question #02 An Array has a mix of 0s and 1s representing False and True Boolean values. Write function AnyTrue() that returns 0
when all the entries in the array are false, and 1 when at least one of the entry in the array is true. Do Not Use Selection
Structures.
Question #03
Allow the user to input the xy co-ordinates for n number of points in a two-dimensional co-ordinate system. Write a
function to evaluate if all those points exist on the same straight line. You can use 2 single dimension arrays of length n.
Question #04*
Write a program that uses a function decoder(). Write the decoder() is such a way that it accepts 3 Boolean inputs,
selects one of the 2 output bits, and writes a 0 or 1 (as provided by the user) on the selected bit.
Question #05*
Write a program that uses a function decoder(). Write the decoder() is such a way that it accepts 4 Boolean inputs,
selects one of the 2 output bits, and writes a 0 or 1 (as provided by the user) on the selected bit.
Question #06*
Write a program that uses a function decoder(). Write the decoder() is such a way that it accepts variable length (e.g. 3,
4, 5) Boolean inputs, selects one of the 2 output bits, and writes a 0 or 1 (as provided by the user) on the selected bit.
*An × 2 decoder is an electronic device. Its name is derived from the fact that it has number of input lines and 2
output lines. Out of these 2 outlines only one is selected based on the Boolean inputs on lines.
Thank you!!
Sir help me to understand burinary operations
AND
NOT
OR
XOR
books recommendetion pkease
Thank youuuuuuuuuuuu 🫶🏻🫶🏻🫶🏻🫶🏻
Great
Hello sir,
very nice explanation im new to programming and came here to know about bits, but i got some doubt, isn't computer take care of all this stuff(signing and other stuff) on its own then why bother learning this concept?
As a developer, the more you understand how things work under the cover - the greater your toolbox to write efficient solutions to various problems. For example, in the following Blog post, I explain how to take advantage of bits and bytes for a highly efficient and convenient technique: bit-wise enumerations: www.morsagmon.com/blog/Excel-VBA-Bit-Wise-Enumerations
Similarly, if a scientist wants to develop a drug to handle immune issues, he needs to understand how the immune system works (not they really do, but that is another discussion...).
Hi. Most people should not care. A programmer should understand how things work, and sometimes may even need to implement a program that makes use of the bits & bytes of things. It's like a gardener that needs to understand about soil quality, pollination, etc. - not just stick a plant in the dirt and pour water...
thank you sir