HMMT 十一月 2009 · 冲刺赛 · 第 7 题
HMMT November 2009 — Guts Round — Problem 7
题目详情
- [ 7 ] A computer program is a function that takes in 4 bits, where each bit is either a 0 or a 1, and outputs TRUE or FALSE. How many computer programs are there?
解析
- [ 7 ] A computer program is a function that takes in 4 bits, where each bit is either a 0 or a 1, and outputs TRUE or FALSE. How many computer programs are there? 4 Answer: 65536 The function has 2 inputs and 2 outputs for each possible input, so the answer is 4 2 16 2 = 2 = 65536.