Practice Problems DLD
Practice Problems DLD
10002000F7CFFFCF1FEF2FEF2A95F1F71A95D9F7EA
The first character sent is the ASCII code for a colon, followed
by a 1. Each has an even parity bit appended as the most
significant bit. A test instrument captures the binary bit
pattern as it goes across the cable to the microcontroller.
(a) What should the binary bit pattern (including parity) look
like? (MSB – LSB)
(b) The value 10, following the colon, represents the total
hexadecimal number of bytes that are to be loaded into
the micro’s memory. What is the decimal number of
bytes being loaded?
(d) The value of the first data byte is F7. What is the value (in
binary) of the least significant nibble of this byte?
FFFF 1111 1111 1111 1111 16 bits
BINARY DATA REPRESENTATION
A small process-control computer uses
hexadecimal codes to represent its 16-bit
memory addresses.
(a) How many hex digits are required?
(b) What is the range of addresses in hex?
(c) How many memory locations are there?
BINARY DATA REPRESENTATION
Numbers are entered into a microcontroller-
based system in BCD, but stored in straight
binary. As a programmer, you must decide
whether you need a one-byte or two-byte
storage location.
(a) How many bytes do you need if the system
takes a two-digit decimal entry?
(b) What if you needed to be able to enter three
digits?
BINARY DATA REPRESENTATION
*In a microcomputer, the addresses of memory locations
are binary numbers that identify each memory circuit
where a byte is stored. The number of bits that make up
an address depends on how many memory locations
there are. Since the number of bits can be very large, the
addresses are often specified in hex instead of binary. (a)
If a microcomputer uses a 20-bit address, how many
different memory locations are there? (b) How many hex
digits are needed to represent the address of a memory
location? (c) What is the hex address of the 256th
memory location? (Note: The first address is always 0.)
COMBINATIONAL LOGICS
PROBLEMS
LOGICS…?
• If chimney is not blocked and the house is cold
and the pilot light is lit, then open the main fuel
valve to start boiler. b = chimney blocked c =
house is cold p = pilot light lit v = open fuel valve
– So in terms of a logical (Boolean) expression