deletedscratch0

I think a shift register could be useful for a project that uses a byte that shortens itself.

TheAdriCoolManDude

What would it do?

FutureBlack16

TheAdriCoolManDude wrote:

What would it do?

I think he's meant this block:
<key [shift v] pressed?>

It would be nice for Scratch to have Shift, Ctrl, Alt, etc. inputs in this block. What we can only use inputs using this block is only numbers and letters.

Also, speaking of which, there a lot of duplicates related to this topic that suggest for more inputs.

deletedscratch0

FutureBlack16 wrote:

TheAdriCoolManDude wrote:

What would it do?

I think he's meant this block:
<key [shift v] pressed?>

It would be nice for Scratch to have Shift, Ctrl, Alt, etc. inputs in this block. What we can only use inputs using this block is only numbers and letters.

Also, speaking of which, there a lot of duplicates related to this topic that suggest for more inputs.
No a shift register is like a thing that shifts a byte of information back a space.

deletedscratch0

a block like:
shift byte() ()digits 

Botcho_Otkho

deletedscratch0 wrote:

FutureBlack16 wrote:

TheAdriCoolManDude wrote:

What would it do?

I think he's meant this block:
<key [shift v] pressed?>

It would be nice for Scratch to have Shift, Ctrl, Alt, etc. inputs in this block. What we can only use inputs using this block is only numbers and letters.

Also, speaking of which, there a lot of duplicates related to this topic that suggest for more inputs.
No a shift register is like a thing that shifts a byte of information back a space.
I'm sure almost nobody (me too) understood this. Can you explain in a more detailed way its function?

deletedscratch0

e.g. 1011001 shifted 1 back would be101100.

Botcho_Otkho

deletedscratch0 wrote:

e.g. 1011001 shifted 1 back would be101100.
Oh, I see. I think “shift register” is an unnecessarily complicated name. Isn't the “get letters from x to y” block better?

deletedscratch0

well its for information like binary
Binary is split into bytes they look like this: 10001110

Botcho_Otkho

deletedscratch0 wrote:

well its for information like binary
Binary is split into bytes they look like this: 10001110
You can use that not just for binary.

Hex4Nova

deletedscratch0 wrote:

e.g. 1011001 shifted 1 back would be101100.

So if I got this right:
// function source
function shift(string, n) {
  return string.slice(0, 0-n);
}
// in practice
console.log(shift("1011001", 1));
“shift” would be a very very limited function. This might be what you mean?

deletedscratch0

Hex4Nova wrote:

deletedscratch0 wrote:

e.g. 1011001 shifted 1 back would be101100.

So if I got this right:
// function source
function shift(string, n) {
  return string.slice(0, 0-n);
}
// in practice
console.log(shift("1011001", 1));
“shift” would be a very very limited function. This might be what you mean?
It is not really like a string it is like a binary/hexadeciaml value (int)

DaEpikDude

Did you know that shifting 1 bit to the right is essentially the same thing as dividing by 2?

deletedscratch0

DaEpikDude wrote:

Did you know that shifting 1 bit to the right is essentially the same thing as dividing by 2?
Actually that is not true because you would need to divide the other bits and then a bunch of problems happen.

DaEpikDude

deletedscratch0 wrote:

DaEpikDude wrote:

Did you know that shifting 1 bit to the right is essentially the same thing as dividing by 2?
Actually that is not true because you would need to divide the other bits and then a bunch of problems happen.
Ok here you go

101 = 5 in decimal

shift 1 bit right:

10 = 2 in decimal (i.e. floor of 5 / 2)

or even simpler:

10 = 2

shift 1 bit right:

1 = 1 (2 / 2)

it's basically just floor of a number / 2

TheAspiringHacker

Why do you use the term “register?” A register is a quickly accessible storage location. Scratch doesn't deal with such low-level concepts and the block itself isn't related to registers.

liamjohnsoncoding123

Yeah me too