Digit Span Task
Version: v1 (current)
The Digit Span task is a classic measure of short-term memory capacity and working memory function. Participants view sequences of digits presented one at a time, then must recall them in either forward or backward order, providing a simple yet powerful assessment of memory span.
Overview
Short-term memory capacity is fundamental to cognition. It determines how much information we can hold in mind while performing mental operations. The Digit Span task, part of many standardized assessments (e.g., Wechsler scales), measures this capacity by presenting increasingly long sequences of digits for immediate recall.
The task comes in two variants: Forward Span (recall in presentation order) assesses passive short-term storage, while Backward Span (recall in reverse order) requires active manipulation and thus taps working memory's executive component. The difference between forward and backward spans reveals the cost of mentally transforming information.
Digit Span is widely used in clinical neuropsychology, cognitive aging research, and studies of attention and working memory. Its brevity, simplicity, and sensitivity to individual differences make it an ideal screening tool for memory impairment and a standard component of cognitive batteries.
Scientific Background
Key Findings:
- Capacity Limits: Average forward span is 7±2 items (Miller, 1956), though modern estimates suggest ~4 chunks in working memory (Cowan, 2001)
- Forward vs. Backward: Backward span is typically 1–2 digits shorter than forward span, reflecting the added executive demand
- Neural Basis: Forward span engages phonological loop (left temporoparietal cortex), while backward span additionally recruits prefrontal executive regions (Hoshi et al., 2000)
- Aging Effects: Backward span shows steeper decline with age than forward span, consistent with executive function vulnerability
Theoretical Framework: According to Baddeley's working memory model, forward digit span primarily reflects the capacity of the phonological loop (articulatory rehearsal + phonological storage), while backward span requires the central executive to manipulate stored information.
Seminal References:
- Miller (1956): "The Magical Number Seven, Plus or Minus Two"
- Wechsler (1939): Introduced Digit Span as part of intelligence assessment
- Baddeley & Hitch (1974): Working memory model distinguishing storage from executive processes
Why Researchers Use This Task
Researchers choose the Digit Span task to:
- Assess working memory capacity in clinical and healthy populations
- Screen for memory impairment in dementia, MCI, ADHD, and learning disabilities
- Study aging effects on storage vs. executive memory processes
- Examine load effects by varying sequence length
- Compare forward vs. backward span to dissociate storage from manipulation
- Predict performance on complex cognitive tasks (reading comprehension, reasoning)
Configuration Options
Visual Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Font size (px) | number | 96 | Size of digit display in pixels (range: 8–400). |
| Forward prompt | string | "Type the digits in the same order:" | Prompt shown before forward recall trials. |
| Backward prompt | string | "Type the digits in reverse order:" | Prompt shown before backward recall trials. |
Timing Parameters
Timing parameters are defined per-trial in the trial configuration:
| Parameter | Type | Default | Description |
|---|---|---|---|
| Digit duration (ms) | number | 1000 | How long each digit is displayed (100+ms). |
| ISI (ms) | number | 500 | Inter-stimulus interval (blank screen between digits, 0+ms). |
| Response timeout (ms) | number | 10000 | Maximum time to wait for response (1000-30000ms, 0 = unlimited). |
Practice Trials
| Parameter | Type | Default | Description |
|---|---|---|---|
| Enable practice | boolean | False | Enable practice trials with visual feedback (green checkmark for correct, red X for incorrect). |
| Practice trials | array | [] | Array of practice trial configurations (same structure as main trials). |
Keyboard Shortcuts
Researchers can customize the keyboard bindings used during the task:
| Parameter | Type | Default | Description |
|---|---|---|---|
| Show keyboard hint | boolean | True | Display an on-screen hint showing the configured keys |
| Number key | key | Any number (0-9) | Key accepted for digit input |
| Number action label | text | "to type digits" | Label shown in the keyboard hint |
| Submit key | key | Enter | Key to submit the response |
| Submit action label | text | "to submit" | Label shown in the keyboard hint |
The default "Any number" setting accepts any digit key 0-9.
Instructions
Four instruction types are available:
| Instruction Type | Description |
|---|---|
| Main instructions | Shown before task starts on a dedicated page with camera/screenshare preview. |
| Hint instructions | Quick reference shown via "?" button during task execution. |
| Practice instructions | Shown before practice trials begin (if practice enabled). |
| Trials instructions | Shown after practice, before main trials (if practice enabled). |
Trial Configuration
Each trial in the trials spreadsheet is defined by:
| Column | Type | Required | Description |
|---|---|---|---|
| digits | array or comma-separated | Yes | Sequence to present (e.g., 3,7,2,9 or [3,7,2,9]). |
| direction | Forward or Backward | Yes | Recall order: forward (as presented) or backward (reversed). |
| digit_duration_ms | number | No | Override display duration for this trial (default: 1000ms). |
| isi_ms | number | No | Override ISI for this trial (default: 500ms). |
| response_timeout_ms | number | No | Override response timeout for this trial (default: 10000ms). |
| block | string | No | Optional block label for grouping trials in analysis. |
Example Trial Sheet
digits | direction | digit_duration_ms | isi_ms | response_timeout_ms | block
----------------|-----------|------------------|---------|---------------------|----------
3,7,2 | forward | 1000 | 500 | 10000 | forward
5,8,1,9 | forward | 1000 | 500 | 10000 | forward
4,2,7,3,1 | forward | 1000 | 500 | 10000 | forward
6,9,4 | backward | 1000 | 500 | 10000 | backward
3,2,7,9 | backward | 1000 | 500 | 10000 | backward
Design Tips:
- Gradual Difficulty: Start with short sequences (3 digits) and increase gradually (up to 7–9 digits)
- Forward First: Present forward trials before backward to establish the basic task before adding the reversal demand
- Multiple Trials per Length: Use 2–3 trials at each length to get reliable span estimates
- Stopping Rule: In adaptive testing, stop when participant fails 2 consecutive trials at a given length
Default Trials
If no trials are configured, the task provides 6 default trials (3 forward, 3 backward) with increasing span lengths from 3 to 5 digits.
Participant Experience
Unmoderated/Moderated Mode
- Main Instructions: Participant reads task instructions and clicks "Start"
- Practice Phase (if enabled):
- Practice instructions appear
- Practice trials with visual feedback (✓ or ✗)
- Participant sees digits one at a time, then types the sequence
- Trials Instructions (if practice was enabled): Brief reminder before main trials
- Main Trials:
- Digits appear sequentially (e.g., "3" → "7" → "2")
- Blank screen during ISI between digits
- After last digit, response input appears
- Participant types the digits (forward or backward as instructed)
- Press Enter to submit
- Completion: Task ends after all trials
Strictly Moderated Mode
Same flow, but researcher controls advancement via moderator dashboard. Participant cannot advance trials independently. Input controls are hidden.
Response Input Methods
- Keyboard: Type digit keys (0-9) (default -- configurable by researcher), Backspace to delete, Enter to submit (default -- configurable by researcher)
- On-Screen Dial Pad: Click buttons to enter digits (touch-friendly alternative)
- Display: Current input shown on screen as digits are entered
Both methods are available simultaneously in non-strict mode. In strictly moderated mode, input controls are hidden and the moderator advances after observing the participant's verbal response or timeout.
All keyboard bindings are configurable by the researcher in the study configuration. The keys listed above are the defaults.
Data Output
Participation Log Events
The task logs high-resolution events for each trial:
Trial Start (digit_span_trial_start):
{
"trial_index": 1,
"stimulus_id": "digit_span_0_1",
"direction": "forward",
"sequence_length": 4,
"digits": [5, 8, 1, 9],
"block": "forward"
}
Stimulus Onset (digit_span_stimulus):
{
"trial_index": 1,
"stimulus_id": "digit_span_0_1",
"direction": "forward",
"sequence_length": 4,
"digits": [5, 8, 1, 9],
"block": "forward"
}
Response (digit_span_answer):
{
"trial_index": 1,
"stimulus_id": "digit_span_0_1",
"source": "keyboard",
"raw_key": "Enter",
"direction": "forward",
"sequence_length": 4,
"digits_presented": [5, 8, 1, 9],
"response": [5, 8, 1, 9],
"response_correct": true,
"latency_ms": 4523,
"block": "forward"
}
Summary Artifact
At task completion, a JSON summary is generated (digit_span_summary_<taskIndex>.json):
{
"task_kind": "digit_span",
"task_index": 0,
"total_trials": 12,
"overall": {
"total": 12,
"valid_responses": 12,
"correct": 8,
"accuracy": 0.67,
"mean_rt_ms": 5234,
"mean_correct_rt_ms": 4821,
"timeouts": 0
},
"by_direction": {
"forward": {
"total": 6,
"correct": 5,
"accuracy": 0.83,
"max_span": 6,
"mean_rt_ms": 4821
},
"backward": {
"total": 6,
"correct": 3,
"accuracy": 0.50,
"max_span": 4,
"mean_rt_ms": 5647
}
},
"trials": [...]
}
Key Metrics:
- Max Span: Longest sequence correctly recalled (primary measure)
- Accuracy by Length: Proportion correct at each sequence length
- Forward vs. Backward: Compare spans to assess executive demand
- Response Latency: Time from last digit to response submission
Design Recommendations
Trial Counts & Lengths
- Minimum: 6 trials (3–4, 4–5, 5–6 for forward; 3–4 for backward)
- Standard: 12–18 trials (2–3 trials each at lengths 3, 4, 5, 6, 7)
- Adaptive: Start at length 3, increase by 1 after success, decrease after failure
Recommended Sequence Lengths
| Population | Forward Span | Backward Span |
|---|---|---|
| Children (7–10 yrs) | 3–6 digits | 2–4 digits |
| Adults (18–60 yrs) | 4–8 digits | 3–6 digits |
| Older Adults (60+) | 3–7 digits | 2–5 digits |
Timing Guidelines
| Parameter | Recommended | Notes |
|---|---|---|
| Digit duration | 1000ms | Standard rate; 750ms for faster pace |
| ISI | 500ms | Blank between digits; prevents grouping |
| Response timeout | 10000–15000ms | Long enough for slower typists |
Stopping Rules (Adaptive Testing)
- Two-Failure Rule: Stop when participant fails 2 consecutive trials at a given length
- Span Estimate: Max span = longest length with at least 1 correct trial
- Ceiling: Stop at length 9 (very few people exceed this)
Common Issues and Solutions
Issue: Participants Make Transposition Errors
Symptoms: Correct digits but wrong order (e.g., [3, 7, 2] → [3, 2, 7])
Solutions:
- Emphasize order importance in instructions
- Slow down digit presentation rate (increase
digit_duration_msto 1200–1500ms) - Provide practice trials focusing on maintaining serial order
Issue: High Error Rate on Backward Trials
Symptoms: Backward span much lower than expected (e.g., only 2 digits)
Possible Causes:
- Participants not understanding the reversal requirement
- Insufficient practice with backward direction
Solutions:
- Add more explicit backward instructions with examples
- Include 4–6 backward practice trials with feedback
- Use visual prompts (e.g., "Type in REVERSE order")
Issue: Task Too Easy or Too Hard
Solutions for Too Easy:
- Start at longer sequences (5–6 digits instead of 3–4)
- Use faster presentation rate (750ms per digit)
- Add backward-only trials
Solutions for Too Hard:
- Start at shorter sequences (2–3 digits)
- Slow down presentation (1500ms per digit)
- Use forward-only trials
- Increase ISI to reduce memory decay
Issue: Input Errors (Accidental Key Presses)
Symptoms: Many trials with 1 extra or missing digit
Solutions:
- Emphasize use of Backspace to correct mistakes before submitting
- Add confirmation prompt before submitting response
- Show current input clearly on screen as digits are typed
- Provide on-screen dial pad for mouse/touch input
Example Study Configurations
Configuration 1: Standard Clinical Assessment
Purpose: Estimate forward and backward span for clinical screening
Settings:
- Forward trials: Lengths 3, 4, 5, 6, 7 (2 trials each)
- Backward trials: Lengths 2, 3, 4, 5, 6 (2 trials each)
- Digit duration: 1000ms
- ISI: 500ms
- Practice: 2 forward, 2 backward trials
Expected Spans (adults):
- Forward: 5–7 digits
- Backward: 4–6 digits
Configuration 2: Load Manipulation Study
Purpose: Examine how memory load affects recall accuracy
Settings:
- Set sizes: 3, 4, 5, 6, 7 digits
- 10 trials per set size (all forward)
- Plot accuracy as function of load
- Analyze RT increase with load
Configuration 3: Developmental Study
Purpose: Assess span development in children
Settings:
- Ages 7–10: Forward lengths 3–6, Backward 2–4
- Ages 11–14: Forward lengths 4–7, Backward 3–5
- 3 trials per length for reliability
- Slower presentation (1200ms) for younger children
Expected Age Effects: ~0.5 digit increase per year in forward span
Configuration 4: Working Memory Training Study
Purpose: Pre/post assessment for training intervention
Settings:
- Fixed set of 20 trials (balanced across lengths 4–8)
- Same trial order at pre and post
- Include both forward and backward
- Primary outcome: Backward span change
References
-
Baddeley, A. D., & Hitch, G. (1974). Working memory. In G. H. Bower (Ed.), The Psychology of Learning and Motivation (Vol. 8, pp. 47–89). Academic Press.
-
Cowan, N. (2001). The magical number 4 in short-term memory: A reconsideration of mental storage capacity. Behavioral and Brain Sciences, 24(1), 87–114.
-
Hoshi, Y., Oda, I., Wada, Y., Ito, Y., Yamashita, Y., Oda, M., ... & Tamura, M. (2000). Visuospatial imagery is a fruitful strategy for the digit span backward task: A study with near-infrared optical tomography. Cognitive Brain Research, 9(3), 339–342.
-
Miller, G. A. (1956). The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(2), 81–97.
-
Wechsler, D. (1939). The measurement of adult intelligence. Williams & Wilkins.
Related Tasks: N-Back Task, Operation Span Task, Visual Short-Term Memory