Discuss Scratch
- Discussion Forums
- » Suggestions
- » Shift register block
- 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!
- FutureBlack16
- Scratcher
76 posts
Shift register block
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
Community Guidelines - New scratcher? Tips here. - What is Scratch? - Criticize my posts
- deletedscratch0
- Scratcher
82 posts
Shift register block
No a shift register is like a thing that shifts a byte of information back a space.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.
._.
:::::::::::::::::::::::::::::::::::::::::::::
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
I'm sure almost nobody (me too) understood this. Can you explain in a more detailed way its function?No a shift register is like a thing that shifts a byte of information back a space.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 see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
- 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
Oh, I see. I think “shift register” is an unnecessarily complicated name. Isn't the “get letters from x to y” block better? e.g. 1011001 shifted 1 back would be101100.
I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
- deletedscratch0
- Scratcher
82 posts
Shift register block
well its for information like binary
Binary is split into bytes they look like this: 10001110
Binary is split into bytes they look like this: 10001110
._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::
70 POSTS!
- Botcho_Otkho
- Scratcher
1000+ posts
Shift register block
You can use that not just for binary. well its for information like binary
Binary is split into bytes they look like this: 10001110
I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
- Hex4Nova
- Scratcher
1000+ posts
Shift register block
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));
Last edited by Hex4Nova (Sept. 25, 2018 19:57:37)
- deletedscratch0
- Scratcher
82 posts
Shift register block
It is not really like a string it is like a binary/hexadeciaml value (int)e.g. 1011001 shifted 1 back would be101100.
So if I got this right:“shift” would be a very very limited function. This might be what you mean?// function source function shift(string, n) { return string.slice(0, 0-n); } // in practice console.log(shift("1011001", 1));
._.
:::::::::::::::::::::::::::::::::::::::::::::
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?
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- deletedscratch0
- Scratcher
82 posts
Shift register block
Actually that is not true because you would need to divide the other bits and then a bunch of problems happen. Did you know that shifting 1 bit to the right is essentially the same thing as dividing by 2?
._.
:::::::::::::::::::::::::::::::::::::::::::::
HACK | COLLAB | SCRIPTS
::::::::::::::::::::::::::::::::::::::::::::
70 POSTS!
- DaEpikDude
- Scratcher
1000+ posts
Shift register block
Ok here you goActually that is not true because you would need to divide the other bits and then a bunch of problems happen. Did you know that shifting 1 bit to the right is essentially the same thing as dividing by 2?
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
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- 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!
- liamjohnsoncoding123
- Scratcher
4 posts
Shift register block
Yeah me too
edited by kaj 13/13/2013 13:13 pm
- Discussion Forums
- » Suggestions
- » Shift register block