# Error in the Human Machine Language Answer Key?

**URL:** <https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251>\
**Category:** Unit and Lesson Discussion\
**Tags:** csp-unit-3, csp-unit-3-lesson-2\
**Created:** [September 15, 2017, 12:41pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251 "2017-09-15T12:41:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![claudetteguy16](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@claudetteguy16](https://forum.code.org/u/claudetteguy16)\
**Post date:** [September 15, 2017, 12:41pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/1 "2017-09-15T12:41:23Z")

</div>

For the first algorithm (where the right hand simply shifts down the cards), is there an error in the answer key? My students and I think the right hand will end up at position 6, which is the second to last card in the row.

---

<div class="post-metadata">

**Author:** ![anmrobnott](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/anmrobnott/32/505_2.png) [@anmrobnott](https://forum.code.org/u/anmrobnott)\
**Post date:** [September 15, 2017, 2:07pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/2 "2017-09-15T14:07:14Z")

</div>

@claudetteguy16

I think this may be a OFF BY 1 error caused by a difference in indexing. The set-up starts indexing at 0 so shifting right 5 ends you at 5. If you start indexing with 1, shifting 5 ends you up at 6.

Andrea

---

<div class="post-metadata">

**Author:** ![claudetteguy16](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@claudetteguy16](https://forum.code.org/u/claudetteguy16)\
**Post date:** [September 15, 2017, 2:54pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/3 "2017-09-15T14:54:03Z")

</div>

According to the instructions the right hand start at position 1, correct? If so if the right hand shifts over 5 times, it would be end in position 6. Also, the answer key states it will be at the END of the list (position 7), which wouldn’t be true in either case (RH starting at position 0 or position 1).

---

<div class="post-metadata">

**Author:** ![anmrobnott](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/anmrobnott/32/505_2.png) [@anmrobnott](https://forum.code.org/u/anmrobnott)\
**Post date:** [September 15, 2017, 3:18pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/4 "2017-09-15T15:18:21Z")

</div>

@claudetteguy16  
So, I think the answer key is based on indexing starting at 1 which is how it is done in the CB pseudo-language. If the indexing started at 0, there would not be a position 7 to talk about and the other answers also refer to position 7. The starting graphic should probably be changed to align with the CB indexing.

Thanks!

Andrea

---

<div class="post-metadata">

**Author:** ![baker](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/baker/32/1229_2.png) [@baker](https://forum.code.org/u/baker)\
**Post date:** [September 15, 2017, 3:40pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/5 "2017-09-15T15:40:18Z")

</div>

Nope. There’s an error in the answer key. Assuming right hand starts on 1 (left hand on 0) it should either state the right hand lands on 6, or I should add another `shift RH to the R` to the example so it lands on 7. I think I’ll do the latter since we’re trying to demonstrate how to get to the end of the list.

---

<div class="post-metadata">

**Author:** ![baker](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/baker/32/1229_2.png) [@baker](https://forum.code.org/u/baker)\
**Post date:** [September 15, 2017, 3:40pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/6 "2017-09-15T15:40:50Z")

</div>

Thanks for the catch @claudetteguy16

---

<div class="post-metadata">

**Author:** ![claudetteguy16](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@claudetteguy16](https://forum.code.org/u/claudetteguy16)\
**Post date:** [September 15, 2017, 4:02pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/7 "2017-09-15T16:02:29Z")

</div>

That makes sense (and I see someone has already updated the answer key). Just one more thing that is confusing - the last line says:

This is a “brute force” way to move the right hand to the end of the row of cards.

Even if the indexing for the activity is changed to start at 1 (and therefore the answer is that the right hand will be in position 7), it would not actually be at the end - it would be one before the end of the list.

---

<div class="post-metadata">

**Author:** ![claudetteguy16](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@claudetteguy16](https://forum.code.org/u/claudetteguy16)\
**Post date:** [September 15, 2017, 4:10pm UTC](https://forum.code.org/t/error-in-the-human-machine-language-answer-key/10251/8 "2017-09-15T16:10:14Z")

</div>

Nevermind - I see the activity was changed in a different way (one more shift was added to the algorithm).
