CAS Community   >   Resources   >  

Hexadecimal_tables-01
Recursive Program! Generating hexadecimal sequences

Type in how many hexadecimal digits you want. Counts up, displaying each hexadecimal value. Also displays number of possible combinations for that number of digits.

Phil Gardner

Created by Phil Gardner
last edited Mar 12 2021 by Phil Gardner



Uses recursion to build sequences of hexadecimal digits.

Useful to demonstrate how adding each new digit allows many more combinations.

Can also use it to demonstrate how large numbers can be represented in a more compact form (especially when compared to binary representations - use in conjunction with the binary counting program posted earlier).

GCSE and A-Level.

In class we have also placed bets on how long it will take the computer to complete the task and how many combinations there will be for a particular number of digits.

Can paste the code into replit.com or compile on Raspberry Pi, Apple mac or Linux PC.

See also: Brute-force generation of all possible passwords.

Downloaded 72 times.

Download

This resource has attached files: to access these files, please tick the box below to assent to the license terms
License: The resources on CAS website are under Creative Commons Attribution-Share Alike 3.0 licence unless otherwise specified by the resource creators.

You must confirm that you have read and agree the licence's ToS before you can download the attachments of this resource.

I have read the licence agreement of this resource and agree to abide by its terms and conditions.

Feedback and Comments


Available when logged in (join via the front page, for free):
  • View 0 comments on this resource.
  • View resource history, links to related resources.
  • Leave feedback for the author(s), or help by editing the resource.
Categories:


© 2021 BCS, The Chartered Institute for IT Registered charity: No. 292786
Using the websiteDisclaimer of liabilityCookies policyPrivacy notice