Discuss Scratch

deletedscratch0
Scratcher
82 posts

Shift register block

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


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
TheAdriCoolManDude
Scratcher
1000+ posts

Shift register block

What would it do?

I would be perfectly fine listing all the featured creators going to Vidcon 2019
FutureBlack16
Scratcher
76 posts

Shift register block

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.

ᖴᑌ丅ᑌᖇᗴᗷᒪᗩᑕᛕ

I try to be as respectful & helpful in Scratch forum as possible, i avoid using “Support” or “No Support” when i'm posting on suggestion forum, and i'm trying to make my posts as new scratcher friendly as possible by linking to an ITopic. I take care of necroposting, thread hijacks, etc. If you have any suggestions how to improve my posts and make my posts more helpful, be sure to click “Criticize my post” and leave a comment suggestion down below. Your feedbacks will help me to be more helpful in Scratch forum.
Community Guidelines - New scratcher? Tips here. - What is Scratch? - Criticize my posts
deletedscratch0
Scratcher
82 posts

Shift register block

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.


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
deletedscratch0
Scratcher
82 posts

Shift register block

a block like:
shift byte() ()digits 


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
Botcho_Otkho
Scratcher
1000+ posts

Shift register block

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?

This is a signature, meaning this automatically appears under my posts. (This is for people who may be confused about this)
Freddie Mercury lover <3 <3 <3 - Wiki editor - Catholic - Forum Helper - Italian - 14 years old - Sagittarius - I use Windows 7 Ultimate and Google Chrome - Guitar, Stranger Things <3 <3 - I often forget things :P
deletedscratch0
Scratcher
82 posts

Shift register block

e.g. 1011001 shifted 1 back would be101100.


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
Botcho_Otkho
Scratcher
1000+ posts

Shift register block

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?

This is a signature, meaning this automatically appears under my posts. (This is for people who may be confused about this)
Freddie Mercury lover <3 <3 <3 - Wiki editor - Catholic - Forum Helper - Italian - 14 years old - Sagittarius - I use Windows 7 Ultimate and Google Chrome - Guitar, Stranger Things <3 <3 - I often forget things :P
deletedscratch0
Scratcher
82 posts

Shift register block

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


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
Botcho_Otkho
Scratcher
1000+ posts

Shift register block

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.

This is a signature, meaning this automatically appears under my posts. (This is for people who may be confused about this)
Freddie Mercury lover <3 <3 <3 - Wiki editor - Catholic - Forum Helper - Italian - 14 years old - Sagittarius - I use Windows 7 Ultimate and Google Chrome - Guitar, Stranger Things <3 <3 - I often forget things :P
Hex4Nova
Scratcher
500+ posts

Shift register block

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?

Last edited by Hex4Nova (Sept. 25, 2018 19:57:37)



「カオスだよ、カオスだね!」
250th post | 500th post | 750th post | 1000th post
OXYGEN: A forum banner shop
deletedscratch0
Scratcher
82 posts

Shift register block

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)


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
DaEpikDude
Scratcher
1000+ posts

Shift register block

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

“Very well, Mr. Justice. I never thought I'd be saying this, but you may burn the evidence.”
- Judge, Phoenix Wright: Ace Attorney: Spirit of Justice
deletedscratch0
Scratcher
82 posts

Shift register block

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.


._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::

70 POSTS!
DaEpikDude
Scratcher
1000+ posts

Shift register block

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

“Very well, Mr. Justice. I never thought I'd be saying this, but you may burn the evidence.”
- Judge, Phoenix Wright: Ace Attorney: Spirit of Justice
TheAspiringHacker
Scratcher
100+ posts

Shift register block

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.

Long live Kyoto Animation!

Powered by DjangoBB

Standard | Mobile