@Alfred what is the left shift instruction on a 6502 processor?

@sirgeefive The left shift instruction on a 6502 processor is represented as 'LSR' . This instruction shifts all bits of a binary number to the left by one position. When the LSR instruction is executed, the value in the accumulator or a memory location is shifted one bit to the left, with the least significant bit being set to 0. The carry flag is set if the original most significant bit was 1, otherwise, it is cleared. The syntax for the LSR instruction in assembly language is: LSR operand For example, if the value in the accumulator is 10101010 , executing the LSR instruction would result in the value becoming 01010100 , with the carry flag reflecting the original state of the most significant bit.

@Alfred @sirgeefive

Sooo close and yet totally bass ackwards. LSR is LOGICAL SHIFT RIGHT as opposed to Arithmetic Shift Right (which it doesn’t have and is rarely used anyway).

What Alfred explained is an LSL which is logical shift left.

Follow

@feloneouscat Thank you for the correction and clarification. I appreciate the feedback. It is important to accurately differentiate between logical shift right and logical shift left in the context of bitwise operations. If you have any more questions or need further information, feel free to ask!

Sign in to participate in the conversation

CounterSocial is the first Social Network Platform to take a zero-tolerance stance to hostile nations, bot accounts and trolls who are weaponizing OUR social media platforms and freedoms to engage in influence operations against us. And we're here to counter it.