@@joetheprofessor6260 thank you for you answer, but if we perform the bitwise OR of 0x1(R0) and 0xC (R3) the result is 0xD and from what you have wrote earlier I thnik that should be 0xC. Thank you for answers for understanding this.
You use bit-banging when you only want to modify some, not all, of the bits in a register. For example, one function might use bits 0-3 and another might use 4-7. Each function must be careful to only modify those bits it is allowed to access, and not make any assumptions about the values of bits that it is not allowed to access.
@@joetheprofessor6260 for example ı have to make 00000011 to 00000010 in a register. I am assigning relevant register to "2" (in decimal form ). You say 7-6-5-4-3-2-1 bits are busy in the register while assigning another function try to use those pins, is that right?
@@coderhex1675 By simply assigning the value 2 to the register you are forcing bits 4-7 to be zero. But if those bits are controlled by some other function, some other part of your overall program, they may not be zero when you are ready to clear bit 0. That's why bit banging is used.
Understood... very thank you. By the way would you like to find me on facebook: osman.cicek.9216 I want to meet with you. Please PM me. Sorry for my bad english.
Because the OR of 0xB and 0x1 is 0xB....that's why we have the B in R4. R3 doesn't change because it is not a destination register for any of the instructions.
I am watching your videos and I live them. However, using the term bit-banging is not correct. you mean bit-banding which is a feature in arm processors. bit-banging is a software technique to send serial communication over gpio.
I understand what bit banding is, and that's not what I'm talking about. I'm using the term to refer to the underlying bit manipulations that you must do to the I/O registers in order to accomplish the serial communication you are referring to. I'll concede that it might be better to call this bit manipulation or bit bashing.
I've heard and used the term "bit-banging" many many times. Nothing new to me. What I haven't heard of is the vertical bar '|' (or just "bar") being called a "pipe". Never heard of that before.
@@joetheprofessor6260 I am very familiar with pipes in command language interpreters. Within the narrow context you describe, the "pipe operator" is represented by the ASCII unbroken vertical bar character (there is a broken vertical bar' ¦' character and that one is not in ASCII). But the character is not a "pipe character" just as an asterisk is not a "multiply character". In fact, Unicode clarifies that '*' is an asterisk and is intended to be used for a footnote indicator which was its traditional purpose before programmers hijacked it for other uses. Unicode defines the '×' to be the multiply character (or more strictly its Code Point). In the C language, the asterisk is used as the "multiply operator" but it is wrong to call it the "multiply character". The character is still called an asterisk. As in the C language, the unbroken vertical bar is the inclusive OR operator. Applying jargon that comes from unspecified and/or unrelated contexts should be avoided. It only causes confusion.
Thank you so much for this clear and concise tutorial. Very useful
Fernando.
Please give us more videos like this Sir.
Thanks it was very clear tutorial please keep up the good work ....
now we could all bang those bits....
Thanks for clearing the bitbanging concept .
Thank you very much. Will you post more videos? more advanced concepts in C or assembly.
Thanks professor. I thought this is called bit manipulations in 8-bit architecture.
Hi Mr. Joe in munute 3:30 in register R4 is value 0x0000ABDD, it should not be value 0x0000ACDD? Thank you for this video.
No. If we perform the bitwise OR of 0x1 (from R0) and 0xB (from R3) the result will be 0xB.
@@joetheprofessor6260 thank you for you answer, but if we perform the bitwise OR of 0x1(R0) and 0xC (R3) the result is 0xD and from what you have wrote earlier I thnik that should be 0xC. Thank you for answers for understanding this.
@@Antyelektronika 0x1 is 0b0001 and 0xC is 0b1100. If we OR them together we get 0b1101 which is 0xD
Thank you for your video, it is very helpul
What I was hoping for was to see you explain the binary encodings for these instructions.
why we use bit banging operator instead of assigning a value to a register to change register value? what is the purpose of this?
You use bit-banging when you only want to modify some, not all, of the bits in a register. For example, one function might use bits 0-3 and another might use 4-7. Each function must be careful to only modify those bits it is allowed to access, and not make any assumptions about the values of bits that it is not allowed to access.
@@joetheprofessor6260 for example ı have to make 00000011 to 00000010 in a register. I am assigning relevant register to "2" (in decimal form ). You say 7-6-5-4-3-2-1 bits are busy in the register while assigning another function try to use those pins, is that right?
@@coderhex1675 By simply assigning the value 2 to the register you are forcing bits 4-7 to be zero. But if those bits are controlled by some other function, some other part of your overall program, they may not be zero when you are ready to clear bit 0. That's why bit banging is used.
Understood... very thank you. By the way would you like to find me on facebook: osman.cicek.9216 I want to meet with you. Please PM me. Sorry for my bad english.
at 3:28, why didn't the B change by one in R3?
Because the OR of 0xB and 0x1 is 0xB....that's why we have the B in R4. R3 doesn't change because it is not a destination register for any of the instructions.
I am watching your videos and I live them. However, using the term bit-banging is not correct. you mean bit-banding which is a feature in arm processors. bit-banging is a software technique to send serial communication over gpio.
I understand what bit banding is, and that's not what I'm talking about. I'm using the term to refer to the underlying bit manipulations that you must do to the I/O registers in order to accomplish the serial communication you are referring to. I'll concede that it might be better to call this bit manipulation or bit bashing.
I've heard and used the term "bit-banging" many many times. Nothing new to me. What I haven't heard of is the vertical bar '|' (or just "bar") being called a "pipe". Never heard of that before.
In a unix shell the vertical bar is used to take the output from one command and "pipe" it to the input of another command.
@@joetheprofessor6260 I am very familiar with pipes in command language interpreters. Within the narrow context you describe, the "pipe operator" is represented by the ASCII unbroken vertical bar character (there is a broken vertical bar' ¦' character and that one is not in ASCII). But the character is not a "pipe character" just as an asterisk is not a "multiply character". In fact, Unicode clarifies that '*' is an asterisk and is intended to be used for a footnote indicator which was its traditional purpose before programmers hijacked it for other uses. Unicode defines the '×' to be the multiply character (or more strictly its Code Point). In the C language, the asterisk is used as the "multiply operator" but it is wrong to call it the "multiply character". The character is still called an asterisk. As in the C language, the unbroken vertical bar is the inclusive OR operator. Applying jargon that comes from unspecified and/or unrelated contexts should be avoided. It only causes confusion.