Thaqalain said:

1)An 8 bit transistor register has output voltage of LHLHLHLH,What is

equivalent decimal number being stored?

(2) A 4 bit transistor registry has output voltage of HLHL,what binary

number and it's decimal equivalent is stored?

I am new in ems cos want to qualify test for entry.

Yikes. more poorly constructed questions.

Binary logic can code a 1 as either a more positive (H) or more

negative (L) level. It is strictly a matter of convention. But a

logic high is more commonly used to represent a value of 1 than a

logic low is, so lets go with that convention.

Then there is a convention, not a hard rule whether the left most bit

represents the smaller or higher binary value. Based on the

conventions for decimal numbers let's assume that the right most bit

represents the smallest power of 2.

Bit there are still lots of ways that bits might represent value.

There are positive only values, sign and value, 2's compliment codes,

1's complement and then there are many ways to represent a floating

point value. There is also a decimal code commonly used called binary

coded decimal or BCD that uses each group of 4 binary bits to

represent a decimal digit. But let's guess that they are asking about

the simplest code for integer positive values.

Under those assumptions, LHLHLHLH would be the binary 01010101 and

would represent the binary value of

2^6 + 2^4 + 2^2 + 2^0 or 64 + 16 + 4 + 1 = 85 decimal.

Using these same assumptions for the 4 bit register holding HLHL, the

pattern would represent the binary number, 1010 which would represent

a value of

2^3 + 2^1 = 8 + 2 = 10 decimal.

This result rules out the possibility that this code is BCD, since 9

is the highest value used for a digit.

Have these examples made it clear how these conversions work (based on

the assumed but not stated conventions)?