SHENZHEN I/O

SHENZHEN I/O

Not enough ratings
Tesla Challenge 1: Fizzbuzz Test Engine
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
2.219 KB
8 Apr, 2017 @ 11:18am
1 Change Note ( view )

Subscribe to download
Tesla Challenge 1: Fizzbuzz Test Engine

In 1 collection by 89o
SHENZHEN I/O Tesla Challenge Pack
24 items
Description
Subject: Preschool toy
From: Wu Lili 吴丽丽 <wulili@longteng-co-ltd.gd.cn>

We've been tasked to create a bunch of 'fizzbuzz test' devices for a Shenzhen preschool. If you don't know, the classic fizzbuzz test is about replacing a number with Fizz if 3 divides it, Buzz if 5 divides it, or Fizzbuzz if both 3 and 5 divide it. Our version will use dials that allow the user to set their own values. This should be an easy task.

---------

Small hint: You need to test for divisibility, which requires the modulo operation. It is easier to do in MCxxxx assembly than division is.

Big hint: To test if b divides a, keep subtracting b from a. If you reach 0, it's divisible; if you reach a negative number before reaching 0, it's not.

Optimization tip: The code to test for divisibility fits into an MC4000X microcontroller.
1 Comments
Verdammte Heinz 11 Feb @ 2:30pm 
Did it in 8 / 472 / 21