Microsoft/calculator

Programmer mode on Calculator supports unsigned values

Open

#66 opened on Feb 27, 2019

View on GitHub
 (27 comments) (116 reactions) (0 assignees)C++ (2,422 forks)batch import
EnhancementPri: 2help wantedneeds spec

Repository metrics

Stars
 (16,196 stars)
PR merge metrics
 (Avg merge 15h 43m) (7 merged PRs in 30d)

Description

Problem Statement Programmers need to work with both signed and unsigned values. Calculator is currently optimized for signed values only.

Evidence or User Insights For example, while calculator will works on INT64 numbers, if I try to paste in a UINT64 value, e.g. 18403114778001080163, it shows as invalid input. Also, currently, the Bit Flip pane only supports signed numbers (the most significant bit is the Sign bit). Unsigned number support is a gap in our programmer mode.

For example, "256" does not fit into a single byte (requires a word): image

Proposal Add support for unsigned values in programmer mode.

Goals

  • Support both signed and unsigned values in programmer mode.
  • Support the option to switch between working with signed and unsigned values.
  • All applicable operations should adapt to signed/unsigned status.
  • Ensure that terminology is consistent with standards when referring to types like QWORD, DQORD, WORD, and BYTE (these terms generally refer to the unsigned versions).

Non-Goals

  • None

Low-Fidelity Concept image

Requested Assignment I'm just suggesting this idea. I don't want to implement it.

Contributor guide