private void formatIntegerTypes(Program program, Address addr, Scalar scalar,
			StringBuilder htmlText) {
		ByteMemBufferImpl memBuffer = getScalarOperandAsMemBuffer(addr, scalar, 1);

		StringBuilder sb = new StringBuilder();

		// For each data type, render different the bases/formats
		for (DataType type : INTEGER_DISPLAY_TYPES) {

			if (type.getLength() != memBuffer.getLength()) {
				continue;
			}

			List<String> reprs = new ArrayList<>();
			for (Settings setting : INTEGER_SETTINGS) {
				String repr = type.getRepresentation(memBuffer, setting, type.getLength());
				if (repr.equals("??")) {
					repr = HTMLUtilities.HTML_SPACE;
				}
				reprs.add(repr);

			}
			addReprRow(sb, type.getDisplayName(), reprs);
		}

		if (sb.length() > 0) {
			htmlText.append("<table><tr><th nowrap>&nbsp;</th>");
			for (Settings setting : INTEGER_SETTINGS) {

				String radixName = FORMAT.getDisplayChoice(setting);
				radixName = Character.toTitleCase(radixName.charAt(0)) + radixName.substring(1);

				htmlText.append("<th nowrap>").append(radixName).append("</th>");
			}
			htmlText.append("</tr>");
			htmlText.append(sb);
			htmlText.append("</table>");
		}
	}
A hover service to show tool tip text for hovering over scalar values.
The tooltip shows the scalar in different bases.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractScalarOperandHover.java